Metric 1 working sufficiently. Metric 2 distance matrix precomputation working