Removed several Sonar issues.