Refactoring of timespan events using $scope.$emit