Various minor sonar issues fixed