James C - added tests for invariants
James C - invariants now work (first draft)
James C - added a few more tests
James C - made invariants not fire in pending blocks, nor count towards being pending