Resolve remaining Sonar issues