Merged old PUT-VALUES code into code for RETURN
Bug fixes.