Switched back to eagerly creating linked model elements. Also reworked element closing so that the graph from an element is traversed once only, rather than on each use as an input.
Added some javadocs.