Code Quality: fixed various Sonar violations (no functionality change)