Clean up Switch command code that used to make grown men blush.