Minimized lines > 79 characters, trailing whitespace, and whitespace before :
Used start-snippet-# and end-snippet-# for precise inclusion of code in ReStructuredText files. Many cosmetic changes to reduce pep8 warnings.