cleaned up code in preparation for new table "schedule"
TO-DO: remove duplicates in calendar/subjects