invariants

Invariant conditions are checked before and after every transition and will throw an InvariantException if false