various tweaks and cleanups

decided to do a PR against your PR so you can see what i am doing.
This is already mentioned.