Clean up the switch statement.