resolved several errors and added unit tests for message_handler_json, server now parses and echoes event and heartbeat messages