Remove newlines from template