Changed commute function to follow specifications

The commute function swaps the children nodes for all operators, even the ones that aren't commutable.