refactoring document manager ui structure