 
     establishData: -> # NOOP. Input service does not take data
 
-    # Remove all events
-    destroy: -> $(options.elementSelector).off(".GE.MouseService")
+    # Remove all event handlers
+    destroy: -> $(options.elementSelector).off(".#{eventNamespace}")
   }
 
 


    establishData: -> # NOOP. Input service does not take data

    # Remove all events
    destroy: -> $(options.elementSelector).off(".GE.KeyboardService")
  }

# Define mouse input service

  options = _.defaults options,
    elementSelector: "#gameCanvas"

  eventNamespace = _.uniqueId("mouse")

  mouse =
    down: false
    position: null

  $(options.elementSelector).on "mousedown.#{eventNamespace} mouseup.#{eventNamespace} mousemove.#{eventNamespace} mouseleave.#{eventNamespace}", (event) ->
    switch event.type 
      when "mousedown" then mouse.down = true
      when "mouseup" then mouse.down = false
