Some negation, tests refactored.

Change-Id: I2e089ac9c67542d62d08838da92768b3a69c0912