Refactor searchMovies