Refactor TemplateParser class and implement more template variables