refactor almost completed => need to handle the create folder dialog better