added new interface for search results, fixed some bugs, and added some JSON i/f