Sonar issues for QA

This pull RQ can be thought about as Suggested code fix / or we can change sonar rules.