Cleaning code and improving sonar rules compliance