Upgraded the sort algorithm used in the beginning to create the
schedule. At further inspecting it turned out it didn't actually work.