Fixed some issues raised after Sonar Code Quality Report