Refactor class so that the heartbeat can be disabled