Code cleanup.

-Made Scheduler and Scheduler for Windows code less divergent.