Move the template rendering out of the Application and into the template