Initial working version: Only includes upsertSeries()