Moved RPC to separate class