Remove switch statements