minor code cleanup for folder tree