Misc minor changes

@jbdeboer could you please review this PR when you have time (low priority).

It's composed of multiple little commit to ease cherry-picking (/rejecting) some if needed - the second commit is style change only.

Check the commit comment for detailed information.