Modified comparing algorithm.

-> Now it doesn't take distance into account, it just looks for a reference in each list iteratively until a decision
   can be made.