     @otherDayTimeFormat = atom.config.get('event-watch.otherDayTimeFormat')
     @data = atom.config.get('event-watch.data')
 
-  # Private: Do initial setup, create the link element, etc.
-  setup: ->
-    @updateConfig()
-    clickHandler = ->
-      @update()
-      return false
-    @link.href = '#'
-    @addEventListener('click', clickHandler)
-    @clickSubscription = dispose: => @removeEventListener('click', clickHandler)
-    @classList.add('inline-block') # necessiary to make this view visible
-    @appendChild(@link)
-
-  # Private: Returns humanized time remaining string.
-  formatTminus: (dt, fromTime) ->
-    return moment.duration(dt - fromTime).humanize()
-
-  # Private: Returns time formatted time string.
-  formatTime: (dt, fromTime) ->
-    if dt.getDay() != fromTime.getDay()
-      return moment(dt).format(@otherDayTimeFormat)
-    return moment(dt).format(@sameDayTimeFormat)
-
   # Private: Create DOM element of given type with given classes.
   createElement: (type, classes...) ->
     element = document.createElement(type)
     element.classList.add(classes...)
     return element
 
-  # Private: Return true iff given eventTime is within warning threshold from given fromTime.
-  warnForTime: (eventTime, fromTime) ->
-    return eventTime - fromTime <= @warnThresholdMinutes * 60000
-
   # Private: Generate the content of the tooltip.
-  tooltipTile: ->
+  tooltipTitle: ->
     now = new Date
     tip = ''
-    for title, times of @data
-      event = later.parse.text(times)
-      if event.error != -1
-        console.log('error in schedule ' + title + ' at character ' + event.error)
-        continue
-      nexts = later.schedule(event).next(@tooltipDetails)
-      for next in nexts
-        text = (@tooltipDisplayFormat + '<br />')
-          .replace(/\$title/g, title)
-          .replace(/\$time/g, @formatTime(next, now))
-          .replace(/\$tminus/g, @formatTminus(next, now))
-        if @warnForTime(next, now)
-          text = "<b><font color='red'>#{text}</font></b>"
-        tip += text
+    for event in @getEvents(@tooltipDetails, @tooltipDisplayFormat + '<br />', now)
+      text = event.displayText
+      if event.isWarning
+        text = "<b><font color='red'>#{text}</font></b>"
+      tip += text
     return tip
 
   # Private: Refresh view with current event information.

    @tooltip?.dispose()
    @tile?.destroy()
    @tile = null

  # Private: Sets up the event handlers.
  handleEvents: ->

    while @link.firstChild
      @link.removeChild(@link.firstChild)

    # then create and display new widgets
    for event in @getEvents(1, @displayFormat, now)
      eventClasses = ['inline-block']
      if event.isWarning
        eventClasses.push('warn')
        @hasWarning = true
      widget = @createElement('span', eventClasses...)
      widget.textContent = event.displayText
      @link.appendChild(widget)

    # 1 minute refresh during warnings
    if !wasWarning && @hasWarning
      @startTimer(60000)
    else if wasWarning && !@hasWarning
      @startTimer()

