Refactor heartbeats within WorkerCommunication class.

Resolves #40 
Please add more information than just "Unknown ... response".