SingleThreadedScheduler added with test class.
Changes and fixes all the scheduler