refactored scheduler as a class
Merge pull request #2 from kiran-b/master

Refactored scheduler