Further code cleanup after sonar scan