Updated to Java 8 to use where possible