a bunch of cleanups