Refactor SchedulerCore class

Inject IScheduler with StructureMap to make the class testable.