Several concurrency and lambda optimizations