Code cleanup after sonar scan