Replace more helper functors with lambdas.
Remove more helper functors.