Added a Task Scheduler and some other changes