Refactored Scheduler