Remove pprint import
Fix file closing
Add .idea folder to .gitignore