Created Scheduler
Improved Scheduler and tests