Added $rootScope to app.js and mainController.js.