Refactor code to use static imports, and enhance some lambda expression.