STOP const fixed and refactoring duplicated code
Adding gitignore