Finishing implementing formulas.

Closes #3.