Migrate code to Java 8