PEP-8 compliance.

I just have this OCD regarding nicely formatted code ... 

Modified to be mostly compliant to what pep8.py is complaining about -- mostly formatting and some has_key() to 'in' changes. Let me know if you are interested in making the code base more PEP-8 compliant..

Oh, and BTW various line endings (CRLF and LF only) are used throughout the project