Fixing Sonar reported issues.
Fixing Sonar & suggestions of the code review.