Define formula as a class instead of a module

This allows greater flexibility for defining options for a formula