Changed latex style and fixed a lot of stuff in the doc