Working on document tree structure.