removed unused typedefs, moved lambda defintion inside lambdaservice