Merge pull request #195 from arv/document-contains

Document contains
Implement wrapping of document.register