8.x code cleanup