added extractDocumentLinks() and support for Document in queryLink/s