Almost done scheduler for worker
Some clanup in Scheduler code