Refactor code and apply PEP8 whenever possible. There are still a lot of violations including spacing, redundant parentheses, etc.