DirectoryViewer refactoring