Fix undefined identifier error
Remove trailing spaces
Fix incorrect indentation
Fix line wrap (based on column <= 120)
Prefer Template!ident than Template!(ident)
Braces should be placed their own line
Issue 5924 fix