Send user-supplied heartbeat interval
Update version
Move msg handling logic into separate functions based on msg-type