Made distance measure configurable in experiments.