allow instances to be flushed from state; add unit tests; simplify type
collections