PEP8 fixes

The source now seems to comply with PEP8 rules. Most importantly, inconsistent indentation has been fixed.