Code cleaning in Scheduler.
TODO: test and debug late binding