A lot of reformatting

Reformatting to be compliant with the Sphinx engine.