Improved the search controller.