Another round of spelling fixes

And also renamed a loop variable while there.

No functional change.