updated the search angular.js functions and implemented new routes for search.