Used make_unique and updated TaggedValue's constructor.