Undid changes from last push because uniqueness was not being ensured if records had different distances but the same record.