Added heartbeat.
Updated server and client.