A bunch of small cleanups in preperation for merge with dev.