refactors movies.rb and movie_search.rb