Restructuring switch statements.