Various PEP8 & typos fixes. Update setup.py

This should be "Most of the internals _have_ been rewritten".