Fleshed out the scheduler a bit
Manual merge