Controls code cleanup