Added better styling of search result and made minor optimization for the AJAX search