code cleanup round 1