Back-end of search function working.