Made major changes to the Scheduler