Moved JSON-RPC server stuff to server module