             $scope.current.duration += 1
           , 1000)
 
-    onError = (_httpResponse)-> console.log "Something went wrong"
 
+    # Event handlers
     $scope.clearErrors = ->
       $scope.flash_error = null
 
     $scope.startTracking = (newTrackedTime) ->
       trackedTimes.post(newTrackedTime).then(
         (result)->
+          $scope.newTrackedTime = {}
           $scope.current = result
           timer = $interval( ->
               $scope.current.duration += 1

      )

    $scope.stopTracking = ->
      trackedTimes.customPUT(null, "stop").then((result) ->
        $scope.current = null
        $interval.cancel(timer);
        $scope.times = trackedTimes.getList().$object
      ,
      onError
      )

    $scope.delete = (id) ->

controllers = angular.module('controllers')
controllers.controller("TimesController", [ '$scope', '$routeParams', '$location', 'Restangular', '$interval'
  ($scope, $routeParams, $location, Restangular, $interval) ->
    # Controller variables
    trackedTimes = Restangular.all('tracked_times');
    timer = null
    onError = (_httpResponse)-> console.log "Something went wrong"

    # Scope Initialization
    $scope.times = []
    $scope.newTrackedTime = {}
    $scope.flash_error = null
    $scope.times = trackedTimes.getList().$object

    trackedTimes.customGET("current").then (result) ->
