Refactoring of search service providers functions.
Support for custom search provider (with example).