Update codes according to PEP8