Refactored dates, validation, and some other stuff mentionned during code review