Updated some code to Java 8