refactoring the search app to use hybrid url and ajax