Sonar Cleanup

Running builds throw sonar and making suggested corrections as well as overrides for java 6.