Final PEP 8 fixes, replaces .has_key() with 'in'