Several minor sonar issues fixed