Refactored compileAllLambdas