rm sonar code warnings

@JonathanShaw these are some slight changes you may like to add in.