minor get_documentation refactoring