Refactored code using PyCharm
Added .idea/ to .gitignore