Refine the structure of directory