Simplified 2 switch statements.

@tigerw is this terrible or medium C++?