various fixes

As this one sits in parallel to #454 and due to the extract process the first few commits are equivalent; I've used a new process where I take care of the trailing whitespace crap first (it keeps flagging in my visual diff tools and slows me down, so got rid of it was primo) and then extracted each individual edit into a separate commit for ease of reviewing.

We can approach this in a few ways: either you like it as it is and merge or cherrypick or you go and merge #454 first, then I do a rebase of this onto the new HEAD and we take it from there.

Now that I think of this again, maybe a three-stage process works best for all of us:

- merge #454
- a separate pull req which only takes care of all trailing WS so we are both on the same page code wise here.
- rebase this series onto the result of /that/ and see...