Added functions and factories to movies.js