Refactor the simplifier's treatment of case expressions