Massive reorganization and cleanup.