Slight refactor of timer class