Added date validation, added comments