replace custom groovy code with MagicSearchIntoHandEvent
add MagicSearchOntoLibrary event to consolidate custom groovy code