Added search error handling and other minor features.