A bunch of cleanup