added some test for the Scheduler, fixed an issue with scheduler.clear() not working correctly