Add ReplaceSeries and refactor the CreateSeries function into smaller steps

I agree. I'll add some more tests or table driven test tomorrow.