Added docstring
Moved imports to single line for import
Sorted out comments
Trailing whitespace
Whitespace around operators
pep8 line breaks
Removed all multiple statements on one line
All continuation lines now match visual indent