Refactorization of original directory tree map