Finished with formula validation (not yet fully tested)