Various tweaks and cleanups

These changes should be harmless, and I'd push them directly, but I'd prefer if you could briefly look if they seem reasonable to you.