enable plx.upsert helper as well
use forEach to avoid clobbering variable
provide plx.end shortcut
Distinguish update and insert with flag in return value and remove debug info.