avoid loading preprocessors twice

in TemplateExporter

also cleaned up some of the related code.