Lps 32715 Refactor TemplateParser