Lots of cleanups I noticed while reviewing another PR