Optimized transform controls

Minor changes. Reduced code size by a hundred lines or so by removing redundant code.