Cleanup: PEP8 and coding style fixes

Partial pick of evernote@bbb2ffab.