Remove unnecessary lambdas