Replace build_simple_formula with class-based new syntax.