PEP-8 changes

Mostly formatting, some unused and some redefined cleanup.