Fixing issues raised by SonarQube.