More Sonar Corrections and Java 6 support

Collection of changes making more support of java 6 and further cleanup of items indicated via sonarqube.