refactoring and gitignore fix