     @timer = null
     @hasWarning = false
     @tooltip = atom.tooltips.add(@link,
-      title: => @tooltipTile()
+      title: => @tooltipTitle()
       html: true
     )
 

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

    # then generate new widgets
    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
      next = later.schedule(event).next(1)
      text = @displayFormat.slice(0)
        .replace(/\$title/g, title)
        .replace(/\$time/g, @formatTime(next, now))
        .replace(/\$tminus/g, @formatTminus(next, now))

      # create and display widget element
      eventClasses = ['inline-block']
      if @warnForTime(next, now)
        eventClasses.push('warn')
        @hasWarning = true
      widget = @createElement('span', eventClasses...)
      widget.textContent = text
      @link.appendChild(widget)

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


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

  # Public: Returns humanized remaining time string.
  formatTminus: (dt, fromTime) ->
    return moment.duration(dt - fromTime).humanize()

  # Public: Returns formatted time string.
  formatTime: (dt, fromTime) ->
    if dt.getDay() != fromTime.getDay()
      return moment(dt).format(@otherDayTimeFormat)
    return moment(dt).format(@sameDayTimeFormat)

  # Public: Return true iff given eventTime is within warning threshold from given fromTime.
  warnForTime: (eventTime, fromTime) ->
    return eventTime - fromTime <= @warnThresholdMinutes * 60000

  # Public: Returns count events with text formatted according to given display format.
  # Return value is array of events objects like:
  #   {
  #     displayText: string; formatted event text.
  #     isWarning: boolean; true iff event meets warning threshold.
  #   }
  getEvents: (count, format, fromTime) ->
    events = []
    for title, textSchedule of @data
      schedule = later.parse.text(textSchedule)
      if schedule.error != -1
        console.log('error in schedule ' + title + ' at character ' + schedule.error)
        continue
      nexts = later.schedule(schedule).next(count)
      nexts = [nexts] if count == 1
      for next in nexts
        text = format.slice(0)
          .replace(/\$title/g, title)
          .replace(/\$time/g, @formatTime(next, fromTime))
          .replace(/\$tminus/g, @formatTminus(next, fromTime))
        events.push
          displayText: text
          isWarning: @warnForTime(next, fromTime)
    return events

  # 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: Sets up the event handlers.
  handleEvents: ->
