Adding lambda code and generalized a number of functions.  Doesn't compile.