Changed HTMLDocument, added support for creating link tags in head node.