Fleshed out the scheduler a bit