Refactor the use of the switch statements