Refactor a little bit, make all formulas with latex, fix some grammar