Refactored to support datepicker and progress file