Fix variable use before assignment; PEP8 compliance.