Protect against missing cache data.
Fix up tests for last API methods.
Check JSON in body of response for /api/search method.