Factory method of Set now returns shared_ptr.