restructured logic of schedule/view
added function to mark work as complete.