Added command line options for the heartbeat timeout and heartbeat interval, cosmetic code changes