 
     logger = logger_builder.build(stringify_objects: false)
 
-    buildIsEqual = (for_type)->
-      isEqualFunction = (other)->
-        if other instanceof for_type
-          if @_simpleIsEqual
-            @_simpleIsEqual(other)
+    buildIsEqual = (for_type, additional_method=false)->
+      isEqualFunction = (other, eq_calc)->
+        same_type = eq_calc.saveFalseForReport((other instanceof for_type), @unrefined(), other,
+          "Wrong types")
+        if same_type
+          if additional_method
+            @[additional_method](other, eq_calc)
           else
             true
-        else if other instanceof comps.expression
-          ref.refine(other).isEqual @
         else
           false
       logger.instrument(name: "buildIsEqual function", fn: isEqualFunction)


    # Exponentiation
    ref.forType(comps.exponentiation, {
      isEqual: (buildIsEqual(comps.exponentiation)),
      _simpleIsEqual: (other)->
        ref.refine(@base()).isEqual(other.base()) and
          ref.refine(@power()).isEqual(other.power())
      })


    # Expression
    ref.forType(comps.expression, {
      isExpressionEqual: (other)->
        logger.info("isExpressionEqual", @unrefined(), other)
        if @is_error == other.is_error && @is_open == other.is_open
          if _(@expression).size() == _(other.expression).size()
            contains_unequal =
              _.chain(@expression).map((element, i)->
                ref.refine(element).isEqual(other.nth(i))
              ).contains(false).value()
            !contains_unequal
          else
            false
        else
          false

      isEqual: (other)->
        if other instanceof comps.expression
          @isExpressionEqual(other)
    })



    # Multiplication

      isEqual: (buildIsEqual(comps.multiplication))
      })

    # Number
    ref.forType(comps.number, {
      isEqual: (buildIsEqual(comps.number, "checkNumberValues")),
      checkNumberValues: (other, eq_calc)->

        # this is bad; TODO fix
        # The real "todo" here is that
        # numbers are internally of questionable state.
        # Im not entirely sure how to state that number expresison components are equal
        check = "#{@value()}" == "#{other.value()}"
        eq_calc.saveFalseForReport(check, @unrefined(), other, "Numeric values not equal")
    })



    ref.forType(comps.exponentiation, {
      isEqual: (buildIsEqual(comps.exponentiation)),
