created .gitignore for intellij idea
changed gitignore to ignore *.pyc, .DS_Store
added comments to help understanding the code