DATACMNS-601 - Fixes for most of the SonarQube warnings.