Implemented Register and heartbeat