Fixed numerous bugs that were corrupting message headers.  Client and server now exchange single heartbeat