changed MinimalChemFormula(), it better removes common factors