Scheduler code rebase