Moving regex and templates into modules, initial compileTemplateData plus tests