Refactoring the SwitchInstruction class.