Refactor some parts of the code to use Java 8 features
Refactor some parts of the code to use Java 8 features