Changed to use sets for unordered comparisson

Need to change relationships to do the same.