Moving search functionality out of wayfinding.js