Refactored timer module