Miscellaneous Cleanup

These are minor things I've run across that needed fixing. They're mainly a byproduct of #1926, but didn't belong there.