Correct date validation and cleaned up some tests.