Updated ChemicalFormula and ChemicalFormulaGenerator classes