Switch to $rootScope from $scope