Added test for CronHandler
Refactored tests and modules

Refactored module and test module to remove unused lines of codes