Code cleaning from Sonar notifications (major violations)