Broke heartbeat code into mutliple chunks.
Review comments
Merge pull request #37 from soundcloud/jmy-heartbeat-initial-refactor

Broke heartbeat code into multiple chunks.