refine the folder tree.