fix some problems with the redundancy of profile names
Even more work on duplicate detection for edges and nodes