Partial code cleanup.