This seems kind of unrelated to string_replace.  We should separate it into it's own commit.