Moved to Java8. Changed to Lambda functions