First refactor of the search navigator JS
Merge pull request #2274 from darkwing/search-refactor-again

First refactor of the search navigator JS