theme code cleanup