This is the top level factory of Repo, which is what is needed here. Unfortunately way to many things have been stuffed in there, though that is a design problem in Repo, not here.