Feature/refactor rpc classes