Code optimization (switch statements)