Restructured repository factories