Updated RPC server code