Slavishly correct any PEP8 or pyflakes issues found except line length.
Slavishly correct PEP8 and pyflakes issues; also indent and establish main().