Lots of cleanup