Upgrade of search function
Adding JSON support for typeahead