A bunch of cleanups