Reformatted the complete example into rst. Fixes #92.

This will make it easier to include the complete example in the documentation without any duplication.