Simplified code for Combining and NegationElimination.