adding idea to gitignore
cleanup and refactoring