fixed a few small mistakes and prettified some formulas