Heartbeat support

Fixes #44 
Closes #22 

Opened PR for discussion
Up comment should be on this one :P