Tidy templates - remove unused, fold some lines.