Change to java 8 style loops.