Removed obsolete code
Added event for search