Add sonar support.
Sonar fixes