* refactored test framework slightly to support more interesting tests and to make the contract more enforceable * added some new tests and test cases