Replaces $rootScope.$broadcast with the more correct $scope.$emit for Events