Move range to distance generator to utilities.