Added new Scheduler code :). Is faster and the code is cleaner.