Refactored a bit
Added .idea to .gitignore