Fix duplicated folders possibly being named "New Connection" instead of the original folder's name
Minor code cleanup.