Massive code cleanup before release