Added functional JSON parsing and error reporting.
Added missing free() calls in client_interface_connection_handler