Sphinx

Some refactoring to put into Sphinx.

The one that doesn't show is that the original index.rst is now 'flow.rst'.