Sets up the template.