Refactored code and and fixed SonarQube
Moved constants to object that are using them (only one).