Refactor HeartBeat

Note: This PR branches from #3

This PR includes a few changes to the API that make use more clear, and organization of challenge information into an object so that future changes to the API are not likely to break existing code.