changed to extend from Resource instead of Document, and update NuGet package to latest version.