Get rid of lambdas in transform in favor of named functions.