Code cleanup round 3.