Misc fixes

Variety of little things, only change that might be a problem would be f718e0b, but there doesn't seem to be anything relying on it, so I need someone else who knows about this. @tridge Can you chime in here, looks like you added it in 13832b91.