Refactor a bit to enable tests; fix Dependent Scheduler handling. Things are broken right now.
Merge merging mostly work, except multilevel merges are still broken.