Heart Beat timer

Moved timers related code into a new file.