Changed accessiblity for GenerateTemplateCode method.