Fixed a few errors and tried to change the clearing on editSchedule