Added ajax functionality for the search, testing phase.