Fixes #21

Added automated heartbeat protocol