Add working code for searches and search-data generation