Updated template generation.