Cosmetic tweaks

These commits fix a few cosmetic inconsistencies. I have purposefully left out changes to parts of the code where I intend to make more substantial changes. I will open a separate pull request for that when this one is merged or rejected.