 
   if container.setImmediate
     Batman.setImmediate = container.setImmediate
+    Batman.clearImmediate = container.clearImmediate
   else if container.msSetImmediate
     Batman.setImmediate = msSetImmediate
+    Batman.clearImmediate = msClearImmediate
   else if canUsePostMessage()
-    usingTasks = true
-
     prefix = 'com.batman.'
     functions = new Batman.SimpleHash
     handler = (e) ->

        delete functions[handle]
      handle

  else
    Batman.setImmediate = (f) -> setTimeout(f, 0)

  if container.clearImmediate
    Batman.clearImmediate = container.clearImmediate
  else if container.msClearImmediate
    Batman.clearImmediate = msClearImmediate
  else if usingTasks
    Batman.clearImmediate = (handle) -> tasks.unset(handle)
  else if process?.nextTick
    Batman.clearImmediate = (handle) ->
      delete functions[handle]
  else
    Batman.clearImmediate = (handle) -> clearTimeout(handle)

Batman.setImmediate = ->
  _implementImmediates(Batman.container)

        script = null
      document.documentElement.appendChild(script)
      handle
    Batman.clearImmediate = (handle) -> tasks.unset(handle)
  else if process?.nextTick
    functions = {}
    Batman.setImmediate = (f) ->
