Refactor code to match Java 8 standard including lambda expressions and functional
map methods.