Sorted keys when creating similiarity dictionary to make clusters repeatable. Fixed bug causing multiple assignments to be skipped when comparing notes.