Automatic and manual PEP8 fixes, excluding E501: Line length to fix #101
PEP8 line length corrections
Replace has_key() with 'in' and other minor issues for #101