#12 code cleanup