Adding date parsing and fixing validation