Timer.js refactored.