Restructuring with case statements.