#7 code cleanup