Add invariants with more helpful error messages
Fix an example that was working out of coincidence
0.3.1