Formatting of template