 
     class_mixer(Negation)
 
-    class OpenSub
-      invoke: (expression)->
+    class OpenSubExpression
+      action: (expression)->
         _ImplicitMultiplication.build().
           onNumeric(expression).
           append(comps.expression.build().open())
-    class_mixer(OpenSub)
-
-    class _FinalOpenSubExpressionApplcation
-      initialize: (@action)->
+
+      invoke: (expression)->
+        _FinalOpenSubExpressionApplication.build(expression).
+          invokeOrDefault((expression)=> @action(expression))
+
+
+    class_mixer(OpenSubExpression)
+
+    class _FinalOpenSubExpressionApplication
+      initialize: (@expr)->
         @found = false
 
-      invoke: (expr)->
+      findAndPerformAction: (expr)->
         subexp = @nextSubExpression(expr)
         if subexp
-          subexp = @invoke(subexp)
+          subexp = @findAndPerformAction(subexp)
         if @found # the child element below me was updated
           @updateWithNewSubexp(expr, subexp)
         else if expr instanceof comps.expression and expr.isOpen()

          expr.power()
        else false

      invokeOrDefault: (expr)->
        result = @invoke(expr)
        if @wasFound()
          result
        else
          @action(expr)

    class_mixer(_FinalOpenSubExpressionApplcation)


    class CloseSub
      initialize: ->
        @handled = false
      invoke: (expression)->
        logger.info("CloseSub#invoke")
        _FinalOpenSubExpressionApplcation.build(
          (expression)-> expression.close()).invoke(expression)

    class_mixer(CloseSub)

    class Pi
      invoke: (expression)->
        _ImplicitMultiplication.build().
          onNumeric(expression).
          append(comps.pi.build())

    class_mixer(Pi)

    class SquareRoot extends ExpressionManipulation
      invoke: (expression)->

      append_addition: AppendAddition
      append_subtraction: AppendSubtraction
      negate_last: Negation
      open_sub_expression: OpenSubExpression
      close_sub_expression: CloseSubExpression
      append_division: AppendDivision
      pi: AppendPi
      square_root: SquareRoot

    return exports
