Massive code reorganization.