Handle hash collisions properly.
Properly report duplicates within a side.
Removed explicit nil initialisers for local variables (redundant under ARC).