More code cleanup for Sonar