Added coordinate distance function and setup for search results page