Correct the logic for negative intermediate events.
Add inter event for ExpandSets tests.
Introduce NOR gate. Closes #26.