Actually implementing HeartBeat example
Removing superflous comments, formatting