add test for search end-point and general tidy-up