Reduce superfluous lambda nesting