Small code cleanups

3 small commits to clean up bits and make sure I can run it all.