25 items sent to distance matrix are now chosen randomly from search results.
Refactored JavaScript.