- Replaced some methods with lambdas.