More minor changes and converted to Java 7