much needed code cleanup.