refactoring for generality
Add settings to .gitignore