Kill trailing spaces
Have grep count lines
Use format strings to avoid extra parsing
Merge remote-tracking branch 'mathstuf/dev/misc-fixes'

--strategy=ours