Improve error handling / tidy up search view