Improved the searching by adding a SearchQuery class to handle building the searches.