Refactoring of the GCS heartbeat logic.