     return task.identifier
 
 class Task
-  constructor : (@task, @context) ->
+  constructor : (@task, @context, @completed = false) ->
     @identifier = @generateIdentifier()
     htmlElement = $('p', "##{@identifier}")
     self = this

      self.update newValue

    @context.on 'change', "##{@identifier} input", (event) ->
      self.redrawChecked()

  toString : ->
    @task

      element.html self.task
      element.animate { opacity: 1 }, 250

  complete : ->
    element = $("##{@identifier}")
    prop = $('input', element).prop('checked')

    if prop is true
      @completed = true
      decoration = 'line-through'
    else
      @completed = false
      decoration = 'none'

    $('p', element).css('textDecoration', decoration)
