Added search functionality for events and tasks