Redesign folderTree and fix its bugs