Add ReplaceSeries and refactor the CreateSeries function into smaller steps

Done - added a note that it is lexicographically sorted, almost the same thing, just covers numbers as well AFAIK