Refactor JSON-RPC library and implement check-result messages.