Add ReplaceSeries and refactor the CreateSeries function into smaller steps

Sure, that's a mistake. I did have that in there - must have made a mistake while merging.