Kaa-156: Fix blockers and critical issues reported by Sonar.