Cover formulas with unit tests
Fix minor typo