Clean JSONRPC and remove unused code.