Add .gitignore for IntelliJ
Minor refactoring