lots of little cleanups