Cleanup and datepicker js
Some basic fixes