Added working datepicker, fixed minor bugs