pep8, pyflakes

Just a quick code cleanup from running ThreeScalePY.py through pyflakes and pep8 - indentation, mixed tabs and spaces, unused imports and variables, invalid exports in `__all__`.

I'm submitting this onto the ElementTree branch because that's what we're using, but I suggest you run the master branch through pyflakes as well.