crazy fast optimizations

is currently not working on changing schedules.
fixed a bug where subjects were writing the initial schedule
Merge branch 'speedfix'