FormulaTree refactor. Step-1