Refactoring document directory