Allowing to pass an external IDocumentStore.
Ensuring proper use of IDisposable