Testing for commutativity of set operations and removing a dumb console.log