Most of the code for the timetabler apart from the main algorithms