Fixed many of the formulas