Code cleanup take 2.