Correct me if I'm wrong here, but it looks like the logic around adding the NOT syntax to each value is repeated for each case below prior to calling `addPair`.  Can we move that code into `addPair` instead, and tack on one more arg for whether or not to NOT it?