style changes+suggestions for sonar class