Bug-731: Fixed few major Sonar warnings

Change-Id: Ic176a1f7e5478721571b8efdab470bd0dad760d6
Signed-off-by: Milos Fabian <milfabia@cisco.com>
Merge "Bug-731: Fixed few major Sonar warnings"