Add search functionality to Main