Code cleanups in preparation for 2.0 work.