Use shared_ptr at Conversion and MaxMatchSegmentation