Refactored formula arrays into formal classes.