Refactor lambda generation code into a separate visitor.
Use undecorated names for captured variables.
Use real, distinct types to emulate the new keywords.