Changed print with concat. to echo with , for speed reasons
Added dependencies - you cannot delete staff, subjects, students that a timetable entry relies on