Updated the scheduler service to fix an issue with the timer. Also added...

... a test case and updated the code per PEP8 style guide