Simplifying scheduler

Removing unnecessary code and variables