Fixing syntax errors

Hi Ulrich,

apparently I introduced syntax errors when transforming the sources to PEP-8. Maybe it was the original tools, maybe me. Anyhow, I strongly recommend pulling these changes.

I also fixed a bug that made HTTPS connections fail. There are still other things not working, but we'll get there.

Björn