Created initial AJAX search funcationality
Added error handling to search function