Remove redundant brackets.
Substitute lambdas with equivalent 'const'.