Add ReplaceSeries and refactor the CreateSeries function into smaller steps

Good catch. That was sloppy of me.