           expr.power()
         else false
 
-      invokeOrDefault: (expr)->
-        result = @invoke(expr)
+      invokeOrDefault: (@action)->
+        result = @findAndPerformAction(@expr)
         if @wasFound()
           result
         else
-          @action(expr)
-
-    class_mixer(_FinalOpenSubExpressionApplcation)
-
-
-    class CloseSub
+          @action(@expr)
+
+    class_mixer(_FinalOpenSubExpressionApplication)
+
+
+    class CloseSubExpression
       initialize: ->
         @handled = false
       invoke: (expression)->
-        logger.info("CloseSub#invoke")
-        _FinalOpenSubExpressionApplcation.build(
-          (expression)-> expression.close()).invoke(expression)
-
-    class_mixer(CloseSub)
-
-    class Pi
+        logger.info("CloseSubExpression#invoke")
+        _FinalOpenSubExpressionApplication.build(expression).
+          invoke((expression)-> expression.close())
+    class_mixer(CloseSubExpression)
+
+
+
+    # TODO this needs to ahve final open sub expression application
+    class AppendPi
       invoke: (expression)->
         _ImplicitMultiplication.build().
           onNumeric(expression).
           append(comps.pi.build())
 
-    class_mixer(Pi)
+    class_mixer(AppendPi)
 
     class SquareRoot extends ExpressionManipulation
       invoke: (expression)->

        else # not closable, not handled, return
          expr

      wasFound: -> @found

      updateWithNewSubexp: (expr, subexp)->

      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
