Refactored switch() function
Refactored switch() function

Switch function had three separate conditionals handling the three
different possible behaviors into an if/elsif/else to make it clear that
you can only have one of the three.

sanarothe/day,CameronCarroll/day