added datepicker and refactored some jquery selectors