More style fixes

This is the second part of my crusade against non-standard code style; the first part being #476.

Rubocop got updated with a lot of new checks, and this PR ensures we adhere to the guidelines set forth in that new Rubocop.

I will probably squash this PR into a single commit, since it gets quite noisy otherwise.