Extract functions for modifying options of tree elements into a separate
utility object
reStructuredText: improvement - instead of keeping nodes for internal
link targets in the tree the id now simply gets applied to the
subsequent element