A lot of cleanups in the class.