Make comments more PEP8, add headers, and simplify the example.