Refactored templates subsystem into a more general-purpose groovy subsystem, then refactored autoprox add-on to allow advanced repository creation through groovy factory scripts. Refactored autoprox also allows multiple factories keyed by different name prefixes or regexes. This part is still to be tested.