Remove duplication between client factories.