Lots of cleanup of unneeded things.