Heartbeat support

Fixes #44 
Closes #22 

Opened PR for discussion
Maybe move the file elsewhere? It's not really configuration.