Make all indentation spaces (PEP8 E101).
Use 'in' instead of 'has_key()' (PEP8 W601)