More work on the scheduler