Minor improvement in distance matrix computation; more improvement warranted