"factor out" repo client parts