partial code cleanup.