Add ReplaceSeries and refactor the CreateSeries function into smaller steps

Done: As mentioned otherwhere I've the CreateSeries and ReplaceSeries no longer change the input.