Minor cleanup for various unrelated things

Hopefully nothing controversial in here, just cleaning up as I go. Each commit is isolated.

FYI @markhibberd and @raronson