Move Tag class to nodes package.
Change ownerDocument() to root()