Refactired Scheduler