Refactoring and gitignore update