   current = (ctxStack) -> ctxStack[ctxStack.length - 1]
   setValue = (ctxStack, key, value) -> current(ctxStack)[key] = value
   applyStreamValue = (key, index) -> (ctxStack, values) -> setValue(ctxStack, key, values[index])
-  constantValue = (key, value) -> (ctxStack, values) -> setValue(ctxStack, key, value)
+  constantValue = (key, value) -> (ctxStack) -> setValue(ctxStack, key, value)
   mkContext = (template) -> if template instanceof Array then [] else {}
   compile = (key, value) ->
     if (value instanceof Observable)
       streams.push(value)
       funcs.push(applyStreamValue(key, streams.length - 1))
     else if (value == Object(value) and typeof value != "function")
-      pushContext = (key) -> (ctxStack, values) ->
+      pushContext = (key) -> (ctxStack) ->
         newContext = mkContext(value)
         setValue(ctxStack, key, newContext)
         ctxStack.push(newContext)
-      popContext = (ctxStack, values) -> ctxStack.pop()
+      popContext = (ctxStack) -> ctxStack.pop()
       funcs.push(pushContext(key))
       compileTemplate(value)
       funcs.push(popContext)

      @consume = () -> invoke(queue[0])
      @push  = (x) -> queue = [x]
      @mayHave = -> true
      @hasAtLeast = (c) -> queue.length

Source.fromObservable = (s) ->
  if s instanceof Source

        !source.sync or source.ended
      cannotMatch = (p) ->
        _.any(p.ixs, (i) -> !sources[i.index].mayHave(i.count))
      part = (source) -> (unsubAll) ->
        source.subscribe (e) ->
          if e.isEnd()
            source.markEnded()
