cleaning up the search controller and adding private methods