Correct and simplify calculations.