removing empty lines from template.