Move discovery_type_of in ActionShared and use it in prepared_data
Change search collection data format to a hash
Refactoring and comments
Fix specs