Finish heartbeat implementation.