factor out a Style class
fix code so that the documentation compiles properly
some cleanup on the docstrings
some cleanup on the rst code