Changing from tabs to 'switch/case' branching