       deleteItem source
       return
 
-    data = message[0]
-    start_time = new Date data.fields.start_time
-    options.duration = data[0].fields.duration
-    if data.fields.running
-      # Timer should be running.
-      startItem source
-      return
-
-    # Timer is stopped
-    timer_elem.stop(true).css "background-color", timer_elem.data("original-bg-color")
-    .effect "highlight",
-      color: "#cc0000"
-    , 500
-
-    running = false
-    clearItemIntervals()
-    timer_elem.find ".stopclock-stop i"
-    .removeClass "fa-stop"
-    .addClass "fa-trash"
-    if data.fields.stopped_at
-      diff = (new Date(data.fields.stopped_at) - start_time) / 1000
-      updateTimerContent diff, ""
+    receivedData message
 
   setId = (new_id) ->
     # Set backend id to local object.

      diff = (new Date(options.stopped_at) - start_time) / 1000
      updateTimerContent diff, ""

  refreshFromBackend = ->
    if id? # Don't refresh if no data is available.
      jq.ajax
        url: "/homecontroller/timer/get/#{id}"
        success: (data) ->
          start_time = new Date data[0].fields.start_time
          options.duration = data[0].fields.duration
          if data[0].fields.running
            if !running
              startItem "backend"
          else
            if running
              stopItem "backend"
        statusCode:
          404: ->
            deleteItem "backend"

      deleteItem "ui"
      return

    timer_elem.stop true
    .css "background-color", timer_elem.data("original-bg-color")
    .effect "highlight",
      color: "#cc0000"
