Switch to Java 1.7 and clean up code with new Java 1.7 features