Massive code reorganizing.