Reorganised tests, added test for state (failing)