Added .idea/
Refactored some code