Add some more tests, better error handling for dates