Also, just to register a code smell, seems we should be injecting the `DocumentManager` in the constructor in this class,  but that would be some refactoring.