Refactoring doc tree