Document topologies and state abstractions : phase2