[med-svn] [praat] 01/02: Imported Upstream version 6.0.5

Rafael Laboissière rlaboiss-guest at moszumanska.debian.org
Wed Nov 11 13:57:33 UTC 2015


This is an automated email from the git hooks/post-receive script.

rlaboiss-guest pushed a commit to branch master
in repository praat.

commit 24e32f7fb104deb0d89b6a2271eef5ffae69afe9
Author: Rafael Laboissiere <rafael at laboissiere.net>
Date:   Tue Nov 10 07:15:04 2015 -0200

    Imported Upstream version 6.0.5
---
 EEG/EEG.cpp                                 |  66 +++--
 EEG/EEG.h                                   |  18 +-
 EEG/EEGWindow.cpp                           |   2 +-
 EEG/EEG_def.h                               |   4 +-
 EEG/ERP.cpp                                 |   8 +-
 EEG/ERP.h                                   |   4 +-
 EEG/ERPTier.cpp                             |  52 ++--
 EEG/ERPTier.h                               |  16 +-
 EEG/ERPTier_def.h                           |   2 +-
 EEG/praat_EEG.cpp                           |  36 +--
 FFNet/manual_FFNet.cpp                      |  48 ++--
 artsynth/ArtwordEditor.cpp                  |   6 +-
 contrib/ola/FeatureWeights.cpp              |   2 +-
 contrib/ola/KNN.cpp                         | 187 ++++++------
 contrib/ola/KNN.h                           |   2 +-
 contrib/ola/KNN_def.h                       |   6 +-
 dwsys/Collection_extensions.cpp             |  22 +-
 dwsys/Collection_extensions.h               |  15 +-
 dwsys/Command.cpp                           |   6 +-
 dwsys/Command.h                             |   4 +-
 dwsys/Eigen.cpp                             |   7 +-
 dwsys/Eigen.h                               |  16 +-
 dwsys/FileInMemory.cpp                      |   2 +-
 dwsys/FileInMemory.h                        |   9 +-
 dwsys/Index.cpp                             |  16 +-
 dwsys/Index.h                               |   6 +-
 dwsys/Index_def.h                           |   4 +-
 dwsys/Permutation.cpp                       |  97 +++----
 dwsys/Permutation.h                         |  25 +-
 dwtools/CategoriesEditor.cpp                |  31 +-
 dwtools/CategoriesEditor.h                  |   6 +-
 dwtools/EEG_extensions.cpp                  |  28 +-
 dwtools/KlattGrid.cpp                       |  22 +-
 dwtools/KlattGridEditors.cpp                |   4 +-
 dwtools/KlattTable.cpp                      |  16 +-
 dwtools/SpeechSynthesizer.cpp               |   2 +-
 dwtools/Strings_extensions.cpp              |   4 +-
 dwtools/TableOfReal_extensions.cpp          |   2 +-
 dwtools/VowelEditor.cpp                     |   9 +-
 dwtools/praat_David_init.cpp                |  20 +-
 external/espeak/espeakdata_FileInMemory.cpp |   2 +-
 external/espeak/espeakdata_FileInMemory.h   |  15 +
 fon/Cochleagram.h                           |   2 +-
 fon/FormantGrid.h                           |  12 +-
 fon/Harmonicity.h                           |   3 +-
 fon/Ltas.h                                  |   5 +-
 fon/Matrix.cpp                              |  10 +-
 fon/Matrix.h                                |  71 ++---
 fon/Pitch_to_Sound.cpp                      |  10 +-
 fon/Pitch_to_Sound.h                        |   4 +-
 fon/Sound.cpp                               |   2 +-
 fon/Sound.h                                 |   2 +-
 fon/SoundRecorder.cpp                       |   8 +-
 fon/SoundRecorder.h                         |   2 +
 fon/Spectrum.h                              |  12 +-
 fon/Transition.cpp                          |   8 +-
 fon/Transition.h                            |   2 +-
 fon/manual_programming.cpp                  | 367 +++++++++++++++++++++++-
 fon/manual_soundFiles.cpp                   |   2 +-
 fon/manual_tutorials.cpp                    |  16 +-
 fon/praat_Exp.cpp                           |  19 +-
 fon/praat_Fon.cpp                           | 428 ++++++++++++++--------------
 fon/praat_Sound_init.cpp                    | 184 ++++++------
 fon/praat_TextGrid_init.cpp                 | 422 ++++++++++++++-------------
 gram/Network.cpp                            |  16 +-
 gram/Network.h                              |   8 +-
 gram/OTGrammar.cpp                          |  48 ++--
 gram/OTGrammar.h                            |  28 +-
 gram/OTGrammar_ex_NPA.cpp                   |   8 +-
 gram/OTGrammar_ex_NoCoda.cpp                |   4 +-
 gram/OTGrammar_ex_metrics.cpp               |   4 +-
 gram/OTGrammar_ex_tongueRoot.cpp            |   4 +-
 gram/OTMulti.cpp                            |  16 +-
 gram/OTMulti.h                              |  10 +-
 gram/OTMulti_ex_metrics.cpp                 |   4 +-
 gram/manual_gram.cpp                        |  62 ++--
 gram/praat_gram.cpp                         |  72 ++---
 makefiles/makefile.defs.linuxs.alsa         |  23 --
 makefiles/makefile.defs.linuxs.pulse        |  23 ++
 stat/Distributions.cpp                      |  12 +-
 stat/Distributions.h                        |   6 +-
 stat/Distributions_and_Strings.cpp          |  12 +-
 stat/Distributions_and_Strings.h            |   8 +-
 stat/LogisticRegression.cpp                 |  14 +-
 stat/LogisticRegression.h                   |   4 +-
 stat/PairDistribution.cpp                   |  23 +-
 stat/PairDistribution.h                     |   8 +-
 stat/Regression.cpp                         |   8 +-
 stat/Regression.h                           |   4 +-
 stat/Table.cpp                              |  72 +++--
 stat/Table.h                                |  20 +-
 stat/TableEditor.cpp                        |   4 +-
 stat/TableEditor.h                          |   2 +-
 stat/TableOfReal.cpp                        |  56 ++--
 stat/TableOfReal.h                          |  28 +-
 stat/praat_Stat.cpp                         | 279 +++++++++---------
 sys/Collection.cpp                          |   5 +-
 sys/Editor.cpp                              |   3 +-
 sys/Editor.h                                |  25 +-
 sys/EditorM.h                               |  52 ++--
 sys/Graphics.h                              |  18 +-
 sys/Gui.h                                   |   8 +-
 sys/GuiButton.cpp                           |   4 +-
 sys/ScriptEditor.cpp                        |  39 +--
 sys/ScriptEditor.h                          |   2 +-
 sys/Simple.cpp                              |  16 +-
 sys/Simple.h                                |   8 +-
 sys/Strings.cpp                             |  14 +-
 sys/Strings_.h                              |   6 +-
 sys/TextEditor.cpp                          | 104 +++----
 sys/TextEditor.h                            |   4 +-
 sys/Ui.cpp                                  |   6 +-
 sys/melder.cpp                              |   4 +-
 sys/melder_audio.cpp                        |   2 +-
 sys/praat.h                                 |   6 +-
 sys/praat_version.h                         |   6 +-
 116 files changed, 1998 insertions(+), 1664 deletions(-)

diff --git a/EEG/EEG.cpp b/EEG/EEG.cpp
index 772645c..960d99e 100644
--- a/EEG/EEG.cpp
+++ b/EEG/EEG.cpp
@@ -61,8 +61,8 @@ void structEEG :: v_info () {
 
 void structEEG :: v_shiftX (double xfrom, double xto) {
 	EEG_Parent :: v_shiftX (xfrom, xto);
-	if (our sound   )  Function_shiftXTo (our sound,    xfrom, xto);
-	if (our textgrid)  Function_shiftXTo (our textgrid, xfrom, xto);
+	if (our sound   )  Function_shiftXTo (our sound.get(),    xfrom, xto);
+	if (our textgrid)  Function_shiftXTo (our textgrid.get(), xfrom, xto);
 }
 
 void structEEG :: v_scaleX (double xminfrom, double xmaxfrom, double xminto, double xmaxto) {
@@ -76,11 +76,11 @@ void EEG_init (EEG me, double tmin, double tmax) {
 	my xmax = tmax;
 }
 
-EEG EEG_create (double tmin, double tmax) {
+autoEEG EEG_create (double tmin, double tmax) {
 	try {
 		autoEEG me = Thing_new (EEG);
 		EEG_init (me.peek(), tmin, tmax);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"EEG object not created.");
 	}
@@ -95,7 +95,7 @@ long EEG_getChannelNumber (EEG me, const char32 *channelName) {
 	return 0;
 }
 
-EEG EEG_readFromBdfFile (MelderFile file) {
+autoEEG EEG_readFromBdfFile (MelderFile file) {
 	try {
 		autofile f = Melder_fopen (file, "rb");
 		char buffer [81];
@@ -405,7 +405,7 @@ EEG EEG_readFromBdfFile (MelderFile file) {
 			EEG_setChannelName (him.peek(), 63, U"PO4");
 			EEG_setChannelName (him.peek(), 64, U"O2");
 		}
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (U"BDF file not read.");
 	}
@@ -435,14 +435,14 @@ void EEG_filter (EEG me, double lowFrequency, double lowWidth, double highFreque
 	NUMfft_Table_init (& fftTable, nsampFFT);
 */
 		for (long ichan = 1; ichan <= my numberOfChannels - EEG_getNumberOfExtraSensors (me); ichan ++) {
-			autoSound channel = Sound_extractChannel (my sound, ichan);
-			autoSpectrum spec = Sound_to_Spectrum (channel.peek(), true);
-			Spectrum_passHannBand (spec.peek(), lowFrequency, 0.0, lowWidth);
-			Spectrum_passHannBand (spec.peek(), 0.0, highFrequency, highWidth);
+			autoSound channel = Sound_extractChannel (my sound.get(), ichan);
+			autoSpectrum spec = Sound_to_Spectrum (channel.get(), true);
+			Spectrum_passHannBand (spec.get(), lowFrequency, 0.0, lowWidth);
+			Spectrum_passHannBand (spec.get(), 0.0, highFrequency, highWidth);
 			if (doNotch50Hz) {
-				Spectrum_stopHannBand (spec.peek(), 48.0, 52.0, 1.0);
+				Spectrum_stopHannBand (spec.get(), 48.0, 52.0, 1.0);
 			}
-			autoSound him = Spectrum_to_Sound (spec.peek());
+			autoSound him = Spectrum_to_Sound (spec.get());
 			NUMvector_copyElements (his z [1], my sound -> z [ichan], 1, my sound -> nx);
 		}
 	} catch (MelderError) {
@@ -539,13 +539,13 @@ void EEG_removeTriggers (EEG me, int which_Melder_STRING, const char32 *criterio
 	try {
 		if (my textgrid -> numberOfTiers () < 2 || ! Melder_equ (my textgrid -> tier (2) -> name, U"Trigger"))
 			Melder_throw (me, U" does not have a Trigger channel.");
-		TextGrid_removePoints (my textgrid, 2, which_Melder_STRING, criterion);
+		TextGrid_removePoints (my textgrid.get(), 2, which_Melder_STRING, criterion);
 	} catch (MelderError) {
 		Melder_throw (me, U": triggers not removed.");
 	}
 }
 
-EEG EEG_extractChannel (EEG me, long channelNumber) {
+autoEEG EEG_extractChannel (EEG me, long channelNumber) {
 	try {
 		if (channelNumber < 1 || channelNumber > my numberOfChannels)
 			Melder_throw (U"No channel ", channelNumber, U".");
@@ -553,15 +553,15 @@ EEG EEG_extractChannel (EEG me, long channelNumber) {
 		thy numberOfChannels = 1;
 		thy channelNames = NUMvector <char32 *> (1, 1);
 		thy channelNames [1] = Melder_dup (my channelNames [1]);
-		thy sound = Sound_extractChannel (my sound, channelNumber).transfer();
-		thy textgrid = Data_copy (my textgrid);
-		return thee.transfer();
+		thy sound = Sound_extractChannel (my sound.get(), channelNumber);
+		thy textgrid = Data_copy (my textgrid.get());
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": channel ", channelNumber, U" not extracted.");
 	}
 }
 
-EEG EEG_extractChannel (EEG me, const char32 *channelName) {
+autoEEG EEG_extractChannel (EEG me, const char32 *channelName) {
 	try {
 		long channelNumber = EEG_getChannelNumber (me, channelName);
 		if (channelNumber == 0)
@@ -572,7 +572,7 @@ EEG EEG_extractChannel (EEG me, const char32 *channelName) {
 	}
 }
 
-EEG EEGs_concatenate (Collection me) {
+autoEEG EEGs_concatenate (Collection me) {
 	try {
 		if (my size < 1)
 			Melder_throw (U"Cannot concatenate zero EEG objects.");
@@ -594,8 +594,8 @@ EEG EEGs_concatenate (Collection me) {
 		Collection_dontOwnItems (textgridCollection.peek());
 		for (long ieeg = 1; ieeg <= my size; ieeg ++) {
 			EEG eeg = (EEG) my item [ieeg];
-			Collection_addItem (soundCollection.peek(), eeg -> sound);
-			Collection_addItem (textgridCollection.peek(), eeg -> textgrid);
+			Collection_addItem (soundCollection.peek(), eeg -> sound.get());   // YUCK
+			Collection_addItem (textgridCollection.peek(), eeg -> textgrid.get());   // YUCK
 		}
 		autoEEG thee = Thing_new (EEG);
 		thy numberOfChannels = numberOfChannels;
@@ -603,17 +603,17 @@ EEG EEGs_concatenate (Collection me) {
 		for (long ichan = 1; ichan <= numberOfChannels; ichan ++) {
 			thy channelNames [ichan] = Melder_dup (channelNames [ichan]);
 		}
-		thy sound = Sounds_concatenate_e (soundCollection.peek(), 0.0).transfer();
-		thy textgrid = TextGrids_concatenate (textgridCollection.peek()).transfer();
+		thy sound = Sounds_concatenate_e (soundCollection.peek(), 0.0);
+		thy textgrid = TextGrids_concatenate (textgridCollection.peek());
 		thy xmin = thy textgrid -> xmin;
 		thy xmax = thy textgrid -> xmax;
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (U"TextGrids not concatenated.");
 	}
 }
 
-EEG EEG_extractPart (EEG me, double tmin, double tmax, bool preserveTimes) {
+autoEEG EEG_extractPart (EEG me, double tmin, double tmax, bool preserveTimes) {
 	try {
 		autoEEG thee = Thing_new (EEG);
 		thy numberOfChannels = my numberOfChannels;
@@ -621,11 +621,11 @@ EEG EEG_extractPart (EEG me, double tmin, double tmax, bool preserveTimes) {
 		for (long ichan = 1; ichan <= my numberOfChannels; ichan ++) {
 			thy channelNames [ichan] = Melder_dup (my channelNames [ichan]);
 		}
-		thy sound = Sound_extractPart (my sound, tmin, tmax, kSound_windowShape_RECTANGULAR, 1.0, preserveTimes).transfer();
-		thy textgrid = TextGrid_extractPart (my textgrid, tmin, tmax, preserveTimes).transfer();
+		thy sound = Sound_extractPart (my sound.get(), tmin, tmax, kSound_windowShape_RECTANGULAR, 1.0, preserveTimes);
+		thy textgrid = TextGrid_extractPart (my textgrid.get(), tmin, tmax, preserveTimes);
 		thy xmin = thy textgrid -> xmin;
 		thy xmax = thy textgrid -> xmax;
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": part not extracted.");
 	}
@@ -633,24 +633,22 @@ EEG EEG_extractPart (EEG me, double tmin, double tmax, bool preserveTimes) {
 
 void EEG_replaceTextGrid (EEG me, TextGrid textgrid) {
 	try {
-		autoTextGrid textgrid2 = Data_copy (textgrid);
-		forget (my textgrid);
-		my textgrid = textgrid2.transfer();
+		my textgrid = Data_copy (textgrid);
 	} catch (MelderError) {
 		Melder_throw (me, U": TextGrid not replaced with ", textgrid, U".");
 	}
 }
 
-MixingMatrix EEG_to_MixingMatrix (EEG me, long maxNumberOfIterations, double tol, int method) {
+autoMixingMatrix EEG_to_MixingMatrix (EEG me, long maxNumberOfIterations, double tol, int method) {
 	try {
-		autoCrossCorrelationTables tables = Sound_to_CrossCorrelationTables (my sound, 0.0, 0.0, 0.002, 1);
+		autoCrossCorrelationTables tables = Sound_to_CrossCorrelationTables (my sound.get(), 0.0, 0.0, 0.002, 1);
 		autoMixingMatrix thee = MixingMatrix_create (my sound -> ny, my sound -> ny);
 		for (long ichan = 1; ichan <= my numberOfChannels; ichan ++) {
 			TableOfReal_setRowLabel (thee.peek(), ichan, my channelNames [ichan]);
 			TableOfReal_setColumnLabel (thee.peek(), ichan, Melder_cat (U"ic", ichan));
 		}
 		MixingMatrix_and_CrossCorrelationTables_improveUnmixing (thee.peek(), tables.peek(), maxNumberOfIterations, tol, method);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": no MixingMatrix created.");
 	}
diff --git a/EEG/EEG.h b/EEG/EEG.h
index e3314ab..6d073ba 100644
--- a/EEG/EEG.h
+++ b/EEG/EEG.h
@@ -26,11 +26,11 @@
 #include "EEG_def.h"
 oo_CLASS_CREATE (EEG, Function);
 
-EEG EEG_create (double tmin, double tmax);
+autoEEG EEG_create (double tmin, double tmax);
 
-EEG EEG_readFromBdfFile (MelderFile file);
+autoEEG EEG_readFromBdfFile (MelderFile file);
 
-EEG EEGs_concatenate (Collection me);
+autoEEG EEGs_concatenate (Collection me);
 
 void EEG_init (EEG me, double tmin, double tmax);
 long EEG_getChannelNumber (EEG me, const char32 *channelName);
@@ -53,13 +53,13 @@ void EEG_subtractMeanChannel (EEG me, long fromChannel, long toChannel);
 void EEG_setChannelToZero (EEG me, long channelNumber);
 void EEG_setChannelToZero (EEG me, const char32 *channelName);
 void EEG_removeTriggers (EEG me, int which_Melder_STRING, const char32 *criterion);
-EEG EEG_extractChannel (EEG me, long channelNumber);
-EEG EEG_extractChannel (EEG me, const char32 *channelName);
-static inline Sound EEG_extractSound (EEG me) { return Data_copy (my sound); }
-static inline TextGrid EEG_extractTextGrid (EEG me) { return Data_copy (my textgrid); }
-EEG EEG_extractPart (EEG me, double tmin, double tmax, bool preserveTimes);
+autoEEG EEG_extractChannel (EEG me, long channelNumber);
+autoEEG EEG_extractChannel (EEG me, const char32 *channelName);
+static inline autoSound EEG_extractSound (EEG me) { return Data_copy (my sound.get()); }
+static inline autoTextGrid EEG_extractTextGrid (EEG me) { return Data_copy (my textgrid.get()); }
+autoEEG EEG_extractPart (EEG me, double tmin, double tmax, bool preserveTimes);
 void EEG_replaceTextGrid (EEG me, TextGrid textgrid);
-MixingMatrix EEG_to_MixingMatrix (EEG me, long maxNumberOfIterations, double tol, int method);
+autoMixingMatrix EEG_to_MixingMatrix (EEG me, long maxNumberOfIterations, double tol, int method);
 
 /* End of file EEG.h */
 #endif
diff --git a/EEG/EEGWindow.cpp b/EEG/EEGWindow.cpp
index 25cedff..bc341ae 100644
--- a/EEG/EEGWindow.cpp
+++ b/EEG/EEGWindow.cpp
@@ -75,7 +75,7 @@ void structEEGWindow :: v_updateMenuItems_file () {
 
 void EEGWindow_init (EEGWindow me, const char32 *title, EEG eeg) {
 	my eeg = eeg;   // before initing, because initing will already draw!
-	TextGridEditor_init (me, title, eeg -> textgrid, eeg -> sound, false, nullptr, nullptr);
+	TextGridEditor_init (me, title, eeg -> textgrid.get(), eeg -> sound.get(), false, nullptr, nullptr);
 }
 
 autoEEGWindow EEGWindow_create (const char32 *title, EEG eeg) {
diff --git a/EEG/EEG_def.h b/EEG/EEG_def.h
index 7708ebb..bd3ba57 100644
--- a/EEG/EEG_def.h
+++ b/EEG/EEG_def.h
@@ -23,8 +23,8 @@ oo_DEFINE_CLASS (EEG, Function)
 
 	oo_LONG (numberOfChannels)
 	oo_STRING_VECTOR (channelNames, numberOfChannels)
-	oo_OBJECT (Sound, 2, sound)
-	oo_OBJECT (TextGrid, 0, textgrid)
+	oo_AUTO_OBJECT (Sound, 2, sound)
+	oo_AUTO_OBJECT (TextGrid, 0, textgrid)
 
 	#if oo_DECLARING
 		void v_info ()
diff --git a/EEG/ERP.cpp b/EEG/ERP.cpp
index 476c2b4..9b2e2c6 100644
--- a/EEG/ERP.cpp
+++ b/EEG/ERP.cpp
@@ -103,7 +103,7 @@ void ERP_drawChannel_name (ERP me, Graphics graphics, const char32 *channelName,
 	ERP_drawChannel_number (me, graphics, ERP_getChannelNumber (me, channelName), tmin, tmax, vmin, vmax, garnish);
 }
 
-Table ERP_tabulate (ERP me, bool includeSampleNumbers, bool includeTime, int timeDecimals, int voltageDecimals, int units) {
+autoTable ERP_tabulate (ERP me, bool includeSampleNumbers, bool includeTime, int timeDecimals, int voltageDecimals, int units) {
 	double voltageScaling = 1.0;
 	const char32 *unitText = U"(V)";
 	if (units == 2) {
@@ -127,17 +127,17 @@ Table ERP_tabulate (ERP me, bool includeSampleNumbers, bool includeTime, int tim
 				Table_setStringValue (thee.peek(), isamp, ++ icol, Melder_fixed (voltageScaling * my z [ichan] [isamp], voltageDecimals));
 			}
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not converted to Table.");
 	}
 }
 
-Sound ERP_downto_Sound (ERP me) {
+autoSound ERP_downto_Sound (ERP me) {
 	try {
 		autoSound thee = Thing_new (Sound);
 		my structSound :: v_copy (thee.peek());
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not converted to Sound.");
 	}
diff --git a/EEG/ERP.h b/EEG/ERP.h
index 2d9b24f..62da998 100644
--- a/EEG/ERP.h
+++ b/EEG/ERP.h
@@ -42,12 +42,12 @@ void ERP_drawScalp_garnish (Graphics graphics, double vmin, double vmax, enum kG
 void ERP_drawChannel_number (ERP me, Graphics graphics, long channelNumber, double tmin, double tmax, double vmin, double vmax, bool garnish);
 void ERP_drawChannel_name (ERP me, Graphics graphics, const char32 *channelName, double tmin, double tmax, double vmin, double vmax, bool garnish);
 
-Table ERP_tabulate (ERP me, bool includeSampleNumbers, bool includeTime, int timeDecimals, int voltageDecimals, int units);
+autoTable ERP_tabulate (ERP me, bool includeSampleNumbers, bool includeTime, int timeDecimals, int voltageDecimals, int units);
 
 /**
 	Extract the Sound part from the ERP. The channel names are lost.
 */
-Sound ERP_downto_Sound (ERP me);
+autoSound ERP_downto_Sound (ERP me);
 
 /* End of file ERP.h */
 #endif
diff --git a/EEG/ERPTier.cpp b/EEG/ERPTier.cpp
index d7c0dcb..5cec33d 100644
--- a/EEG/ERPTier.cpp
+++ b/EEG/ERPTier.cpp
@@ -78,7 +78,7 @@ double ERPTier_getMean (ERPTier me, long pointNumber, const char32 *channelName,
 	return ERPTier_getMean (me, pointNumber, ERPTier_getChannelNumber (me, channelName), tmin, tmax);
 }
 
-static ERPTier EEG_PointProcess_to_ERPTier (EEG me, PointProcess events, double fromTime, double toTime) {
+static autoERPTier EEG_PointProcess_to_ERPTier (EEG me, PointProcess events, double fromTime, double toTime) {
 	try {
 		autoERPTier thee = Thing_new (ERPTier);
 		Function_init (thee.peek(), fromTime, toTime);
@@ -113,19 +113,19 @@ static ERPTier EEG_PointProcess_to_ERPTier (EEG me, PointProcess events, double
 					event -> erp -> z [ichannel] [isample] = jsample < 1 || jsample > my sound -> nx ? 0.0 : my sound -> z [ichannel] [jsample];
 				}
 			}
-			Collection_addItem (thy events, event.transfer());
+			Collection_addItem (thy events.get(), event.transfer());
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": ERP analysis not performed.");
 	}
 }
 
-ERPTier EEG_to_ERPTier_bit (EEG me, double fromTime, double toTime, int markerBit) {
+autoERPTier EEG_to_ERPTier_bit (EEG me, double fromTime, double toTime, int markerBit) {
 	try {
-		autoPointProcess events = TextGrid_getStartingPoints (my textgrid, markerBit, kMelder_string_EQUAL_TO, U"1");
+		autoPointProcess events = TextGrid_getStartingPoints (my textgrid.get(), markerBit, kMelder_string_EQUAL_TO, U"1");
 		autoERPTier thee = EEG_PointProcess_to_ERPTier (me, events.peek(), fromTime, toTime);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": ERPTier not created.");
 	}
@@ -162,38 +162,38 @@ static autoPointProcess TextGrid_getStartingPoints_multiNumeric (TextGrid me, ui
 	}
 }
 
-ERPTier EEG_to_ERPTier_marker (EEG me, double fromTime, double toTime, uint16_t marker) {
+autoERPTier EEG_to_ERPTier_marker (EEG me, double fromTime, double toTime, uint16_t marker) {
 	try {
-		autoPointProcess events = TextGrid_getStartingPoints_multiNumeric (my textgrid, marker);
+		autoPointProcess events = TextGrid_getStartingPoints_multiNumeric (my textgrid.get(), marker);
 		autoERPTier thee = EEG_PointProcess_to_ERPTier (me, events.peek(), fromTime, toTime);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": ERPTier not created.");
 	}
 }
 
-ERPTier EEG_to_ERPTier_triggers (EEG me, double fromTime, double toTime,
+autoERPTier EEG_to_ERPTier_triggers (EEG me, double fromTime, double toTime,
 	int which_Melder_STRING, const char32 *criterion)
 {
 	try {
-		autoPointProcess events = TextGrid_getPoints (my textgrid, 2, which_Melder_STRING, criterion);
+		autoPointProcess events = TextGrid_getPoints (my textgrid.get(), 2, which_Melder_STRING, criterion);
 		autoERPTier thee = EEG_PointProcess_to_ERPTier (me, events.peek(), fromTime, toTime);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": ERPTier not created.");
 	}
 }
 
-ERPTier EEG_to_ERPTier_triggers_preceded (EEG me, double fromTime, double toTime,
+autoERPTier EEG_to_ERPTier_triggers_preceded (EEG me, double fromTime, double toTime,
 	int which_Melder_STRING, const char32 *criterion,
 	int which_Melder_STRING_precededBy, const char32 *criterion_precededBy)
 {
 	try {
-		autoPointProcess events = TextGrid_getPoints_preceded (my textgrid, 2,
+		autoPointProcess events = TextGrid_getPoints_preceded (my textgrid.get(), 2,
 			which_Melder_STRING, criterion,
 			which_Melder_STRING_precededBy, criterion_precededBy);
 		autoERPTier thee = EEG_PointProcess_to_ERPTier (me, events.peek(), fromTime, toTime);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": ERPTier not created.");
 	}
@@ -240,12 +240,12 @@ void ERPTier_rejectArtefacts (ERPTier me, double threshold) {
 			}
 		}
 		if (minimum < - threshold || maximum > threshold) {
-			Collection_removeItem (my events, ievent);
+			Collection_removeItem (my events.get(), ievent);
 		}
 	}
 }
 
-ERP ERPTier_extractERP (ERPTier me, long eventNumber) {
+autoERP ERPTier_extractERP (ERPTier me, long eventNumber) {
 	try {
 		long numberOfEvents = my events -> size;
 		if (numberOfEvents < 1)
@@ -267,13 +267,13 @@ ERP ERPTier_extractERP (ERPTier me, long eventNumber) {
 		for (long ichan = 1; ichan <= thy ny; ichan ++) {
 			thy channelNames [ichan] = Melder_dup (my channelNames [ichan]);
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": ERP not extracted.");
 	}
 }
 
-ERP ERPTier_to_ERP_mean (ERPTier me) {
+autoERP ERPTier_to_ERP_mean (ERPTier me) {
 	try {
 		long numberOfEvents = my events -> size;
 		if (numberOfEvents < 1)
@@ -304,13 +304,13 @@ ERP ERPTier_to_ERP_mean (ERPTier me) {
 		for (long ichan = 1; ichan <= mean -> ny; ichan ++) {
 			mean -> channelNames [ichan] = Melder_dup (my channelNames [ichan]);
 		}
-		return mean.transfer();
+		return mean;
 	} catch (MelderError) {
 		Melder_throw (me, U": mean not computed.");
 	}
 }
 
-ERPTier ERPTier_extractEventsWhereColumn_number (ERPTier me, Table table, long columnNumber, int which_Melder_NUMBER, double criterion) {
+autoERPTier ERPTier_extractEventsWhereColumn_number (ERPTier me, Table table, long columnNumber, int which_Melder_NUMBER, double criterion) {
 	try {
 		Table_checkSpecifiedColumnNumberWithinRange (table, columnNumber);
 		Table_numericize_Assert (table, columnNumber);   // extraction should work even if cells are not defined
@@ -330,19 +330,19 @@ ERPTier ERPTier_extractEventsWhereColumn_number (ERPTier me, Table table, long c
 			TableRow row = table -> row (ievent);
 			if (Melder_numberMatchesCriterion (row -> cells [columnNumber]. number, which_Melder_NUMBER, criterion)) {
 				autoERPPoint newEvent = Data_copy (oldEvent);
-				Collection_addItem (thy events, newEvent.transfer());
+				Collection_addItem (thy events.get(), newEvent.transfer());
 			}
 		}
 		if (thy events -> size == 0) {
 			Melder_warning (U"No event matches criterion.");
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": events not extracted.");
 	}
 }
 
-ERPTier ERPTier_extractEventsWhereColumn_string (ERPTier me, Table table,
+autoERPTier ERPTier_extractEventsWhereColumn_string (ERPTier me, Table table,
 	long columnNumber, int which_Melder_STRING, const char32 *criterion)
 {
 	try {
@@ -363,13 +363,13 @@ ERPTier ERPTier_extractEventsWhereColumn_string (ERPTier me, Table table,
 			TableRow row = table -> row (ievent);
 			if (Melder_stringMatchesCriterion (row -> cells [columnNumber]. string, which_Melder_STRING, criterion)) {
 				autoERPPoint newEvent = Data_copy (oldEvent);
-				Collection_addItem (thy events, newEvent.transfer());
+				Collection_addItem (thy events.get(), newEvent.transfer());
 			}
 		}
 		if (thy events -> size == 0) {
 			Melder_warning (U"No event matches criterion.");
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": events not extracted.");
 	}
diff --git a/EEG/ERPTier.h b/EEG/ERPTier.h
index ad717eb..318e915 100644
--- a/EEG/ERPTier.h
+++ b/EEG/ERPTier.h
@@ -38,16 +38,16 @@ double ERPTier_getMean (ERPTier me, long pointNumber, long channelNumber, double
 double ERPTier_getMean (ERPTier me, long pointNumber, const char32 *channelName, double tmin, double tmax);
 void ERPTier_subtractBaseline (ERPTier me, double tmin, double tmax);
 void ERPTier_rejectArtefacts (ERPTier me, double threshold);
-ERP ERPTier_extractERP (ERPTier me, long pointNumber);
-ERP ERPTier_to_ERP_mean (ERPTier me);
-ERPTier ERPTier_extractEventsWhereColumn_number (ERPTier me, Table table, long columnNumber, int which_Melder_NUMBER, double criterion);
-ERPTier ERPTier_extractEventsWhereColumn_string (ERPTier me, Table table, long columnNumber, int which_Melder_STRING, const char32 *criterion);
+autoERP ERPTier_extractERP (ERPTier me, long pointNumber);
+autoERP ERPTier_to_ERP_mean (ERPTier me);
+autoERPTier ERPTier_extractEventsWhereColumn_number (ERPTier me, Table table, long columnNumber, int which_Melder_NUMBER, double criterion);
+autoERPTier ERPTier_extractEventsWhereColumn_string (ERPTier me, Table table, long columnNumber, int which_Melder_STRING, const char32 *criterion);
 
-ERPTier EEG_to_ERPTier_bit (EEG me, double fromTime, double toTime, int markerBit);
-ERPTier EEG_to_ERPTier_marker (EEG me, double fromTime, double toTime, uint16 marker);
-ERPTier EEG_to_ERPTier_triggers (EEG me, double fromTime, double toTime,
+autoERPTier EEG_to_ERPTier_bit (EEG me, double fromTime, double toTime, int markerBit);
+autoERPTier EEG_to_ERPTier_marker (EEG me, double fromTime, double toTime, uint16 marker);
+autoERPTier EEG_to_ERPTier_triggers (EEG me, double fromTime, double toTime,
 	int which_Melder_STRING, const char32 *criterion);
-ERPTier EEG_to_ERPTier_triggers_preceded (EEG me, double fromTime, double toTime,
+autoERPTier EEG_to_ERPTier_triggers_preceded (EEG me, double fromTime, double toTime,
 	int which_Melder_STRING, const char32 *criterion,
 	int which_Melder_STRING_precededBy, const char32 *criterion_precededBy);
 
diff --git a/EEG/ERPTier_def.h b/EEG/ERPTier_def.h
index d3bb2c1..cb22d72 100644
--- a/EEG/ERPTier_def.h
+++ b/EEG/ERPTier_def.h
@@ -30,7 +30,7 @@ oo_END_CLASS (ERPPoint)
 #define ooSTRUCT ERPTier
 oo_DEFINE_CLASS (ERPTier, Function)
 
-	oo_COLLECTION (SortedSetOfDouble, events, ERPPoint, 0)
+	oo_AUTO_COLLECTION (SortedSetOfDouble, events, ERPPoint, 0)
 
 	oo_LONG (numberOfChannels)
 	oo_STRING_VECTOR (channelNames, numberOfChannels)
diff --git a/EEG/praat_EEG.cpp b/EEG/praat_EEG.cpp
index eb389b3..e576bfd 100644
--- a/EEG/praat_EEG.cpp
+++ b/EEG/praat_EEG.cpp
@@ -32,7 +32,7 @@
 DIRECT2 (EEGs_concatenate) {
 	autoCollection eegs = praat_getSelectedObjects ();
 	autoEEG thee = EEGs_concatenate (eegs.peek());
-	praat_new (thee.transfer(), U"chain");
+	praat_new (thee.move(), U"chain");
 END2 }
 
 DIRECT2 (EEG_detrend) {
@@ -88,7 +88,7 @@ DO
 		iam (EEG);
 		const char32 *channelName = GET_STRING (U"Channel name");
 		autoEEG thee = EEG_extractChannel (me, channelName);
-		praat_new (thee.transfer(), my name, U"_", channelName);
+		praat_new (thee.move(), my name, U"_", channelName);
 	}
 END2 }
 
@@ -101,7 +101,7 @@ DO
 	LOOP {
 		iam (EEG);
 		autoEEG thee = EEG_extractPart (me, GET_REAL (U"left Time range"), GET_REAL (U"right Time range"), GET_INTEGER (U"Preserve times"));
-		praat_new (thee.transfer(), my name, U"_part");
+		praat_new (thee.move(), my name, U"_part");
 	}
 END2 }
 
@@ -110,7 +110,7 @@ DIRECT2 (EEG_extractSound) {
 		iam (EEG);
 		if (! my sound) Melder_throw (me, U": I don't contain a waveform.");
 		autoSound thee = EEG_extractSound (me);
-		praat_new (thee.transfer());
+		praat_new (thee.move());
 	}
 END2 }
 
@@ -119,7 +119,7 @@ DIRECT2 (EEG_extractTextGrid) {
 		iam (EEG);
 		if (! my textgrid) Melder_throw (me, U": I don't contain marks.");
 		autoTextGrid thee = EEG_extractTextGrid (me);
-		praat_new (thee.transfer());
+		praat_new (thee.move());
 	}
 END2 }
 
@@ -231,7 +231,7 @@ DO
 		iam (EEG);
 		int markerBit = GET_INTEGER (U"Marker bit");
 		autoERPTier thee = EEG_to_ERPTier_bit (me, GET_REAL (U"From time"), GET_REAL (U"To time"), markerBit);
-		praat_new (thee.transfer(), my name, U"_bit", markerBit);
+		praat_new (thee.move(), my name, U"_bit", markerBit);
 	}
 END2 }
 
@@ -245,7 +245,7 @@ DO
 		iam (EEG);
 		uint16 markerNumber = GET_INTEGER (U"Marker number");
 		autoERPTier thee = EEG_to_ERPTier_marker (me, GET_REAL (U"From time"), GET_REAL (U"To time"), markerNumber);
-		praat_new (thee.transfer(), my name, U"_", markerNumber);
+		praat_new (thee.move(), my name, U"_", markerNumber);
 	}
 END2 }
 
@@ -260,7 +260,7 @@ DO
 		iam (EEG);
 		autoERPTier thee = EEG_to_ERPTier_triggers (me, GET_REAL (U"From time"), GET_REAL (U"To time"),
 			GET_ENUM (kMelder_string, U"Get every event with a trigger that"), GET_STRING (U"...the text"));
-		praat_new (thee.transfer(), my name, U"_trigger", GET_STRING (U"...the text"));
+		praat_new (thee.move(), my name, U"_trigger", GET_STRING (U"...the text"));
 	}
 END2 }
 
@@ -278,7 +278,7 @@ DO
 		autoERPTier thee = EEG_to_ERPTier_triggers_preceded (me, GET_REAL (U"From time"), GET_REAL (U"To time"),
 			GET_ENUM (kMelder_string, U"Get every event with a trigger that"), GET_STRING (U"...the text"),
 			GET_ENUM (kMelder_string, U"and is preceded by a trigger that"), GET_STRING (U" ...the text"));
-		praat_new (thee.transfer(), my name, U"_trigger", GET_STRING (U" ...the text"));
+		praat_new (thee.move(), my name, U"_trigger", GET_STRING (U" ...the text"));
 	}
 END2 }
 
@@ -295,7 +295,7 @@ DO
 		autoMixingMatrix thee = EEG_to_MixingMatrix (me,
 			GET_INTEGER (U"Maximum number of iterations"), GET_REAL (U"Tolerance"),
 			GET_INTEGER (U"Diagonalization method"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -344,7 +344,7 @@ DIRECT2 (ERP_downto_Sound) {
 	LOOP {
 		iam (ERP);
 		autoSound thee = ERP_downto_Sound (me);
-		praat_new (thee.transfer());
+		praat_new (thee.move());
 	}
 END2 }
 
@@ -362,7 +362,7 @@ DO
 		iam (ERP);
 		autoTable thee = ERP_tabulate (me, GET_INTEGER (U"Include sample number"),
 			GET_INTEGER (U"Include time"), GET_INTEGER (U"Time decimals"), GET_INTEGER (U"Voltage decimals"), GET_INTEGER (U"Voltage units"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -437,7 +437,7 @@ DO
 		long channelNumber = ERP_getChannelNumber (me, channelName);
 		if (channelNumber == 0) Melder_throw (me, U": no channel named \"", channelName, U"\".");
 		autoSound thee = Sound_extractChannel (me, channelNumber);
-		praat_new (thee.transfer(), my name, U"_", channelName);
+		praat_new (thee.move(), my name, U"_", channelName);
 	}
 END2 }
 
@@ -729,7 +729,7 @@ DO
 	LOOP {
 		iam (ERPTier);
 		autoERP thee = ERPTier_extractERP (me, GET_INTEGER (U"Event number"));
-		praat_new (thee.transfer(), my name, U"_mean");
+		praat_new (thee.move(), my name, U"_mean");
 	}
 END2 }
 
@@ -737,7 +737,7 @@ DIRECT2 (ERPTier_to_ERP_mean) {
 	LOOP {
 		iam (ERPTier);
 		autoERP thee = ERPTier_to_ERP_mean (me);
-		praat_new (thee.transfer(), my name, U"_mean");
+		praat_new (thee.move(), my name, U"_mean");
 	}
 END2 }
 
@@ -753,7 +753,7 @@ DO
 	Table table = FIRST (Table);
 	long columnNumber = Table_getColumnIndexFromColumnLabel (table, GET_STRING (U"Extract all events where column..."));
 	autoERPTier thee = ERPTier_extractEventsWhereColumn_number (erpTier, table, columnNumber, GET_ENUM (kMelder_number, U"...is..."), GET_REAL (U"...the number"));
-	praat_new (thee.transfer(), erpTier -> name);
+	praat_new (thee.move(), erpTier -> name);
 END2 }
 
 FORM (ERPTier_Table_extractEventsWhereColumn_text, U"Extract events where column (text)", 0) {
@@ -766,7 +766,7 @@ DO
 	Table table = FIRST (Table);
 	long columnNumber = Table_getColumnIndexFromColumnLabel (table, GET_STRING (U"Extract all events where column..."));
 	autoERPTier thee = ERPTier_extractEventsWhereColumn_string (erpTier, table, columnNumber, GET_ENUM (kMelder_string, U"..."), GET_STRING (U"...the text"));
-	praat_new (thee.transfer(), erpTier -> name);
+	praat_new (thee.move(), erpTier -> name);
 END2 }
 
 /***** Help menus *****/
@@ -789,7 +789,7 @@ static Any bdfFileRecognizer (int nread, const char *header, MelderFile file) {
 	bool isEdfFile = Melder_stringMatchesCriterion (fileName, kMelder_string_ENDS_WITH, U".edf") ||
 	                 Melder_stringMatchesCriterion (fileName, kMelder_string_ENDS_WITH, U".EDF");
 	if (nread < 512 || (! isBdfFile && ! isEdfFile)) return NULL;
-	return EEG_readFromBdfFile (file);
+	return EEG_readFromBdfFile (file).transfer();
 }
 
 /***** buttons *****/
diff --git a/FFNet/manual_FFNet.cpp b/FFNet/manual_FFNet.cpp
index ef46aeb..a98bdef 100644
--- a/FFNet/manual_FFNet.cpp
+++ b/FFNet/manual_FFNet.cpp
@@ -95,34 +95,34 @@ NORMAL (U"The FFNet uses a %supervised learning algorithm: besides the input pat
 	"is a little bit higher than it is now and that, at the same time, the output values of all the other incorrect outputs are a "
 	"little bit lower than they are now. (The differences between the actual outputs and the idealized outputs "
 	"are propagated back from the top layer to lower layers to be used at these layers to modify connection weights. "
-	"This is why the term %%backpropagation network% is also often used to describe this type of neural network.")
+	"This is why the term %%backpropagation network% is also often used to describe this type of neural network.)")
 NORMAL (U"If you perform the procedure above once for every pattern and category pair in your data "
-	"set you have have performed 1 @epoch of learning.")
+	"set you have performed one @epoch of learning.")
 NORMAL (U"The hope is that eventually, probably after many epochs, "
-	"the neural net will remember these pattern-category pairs. "
-	"You even hope that the neural net when the learning phase has terminated, will be able to %generalize "
+	"the neural net will come to remember these pattern-category pairs. "
+	"You even hope that the neural net, when the learning phase has terminated, will be able to %generalize "
 	"and has learned to "
 	"@@FFNet & Pattern: To Categories...|classify@ correctly any unknown pattern presented to it. ")
-NORMAL (U"Because real-life data many times contains noise as well as partly contradictory information "
-	"these hopes can only be partly fulfilled. ")
+NORMAL (U"Because real-life data often contains noise as well as partly contradictory information, "
+	"these hopes can be fulfilled only partly. ")
 NORMAL (U"For @@FFNet & Pattern & Categories: Learn...|learning@ you "
-	"need to select 3 different objects together: a FFNet (the %classifier), "
+	"need to select three different objects together: a FFNet (the %classifier), "
 	"a Pattern (the %inputs) and a Categories (the %%correct outputs%).")
 ENTRY (U"How long will the learning phase take?")
-NORMAL (U"In general this question is hard to answer. It depends on the size of the neural network, "
+NORMAL (U"In general, this question is hard to answer. It depends on the size of the neural network, "
 	"the number of patterns to be learned, the number of epochs, the tolerance of the minimizer "
 	"and the speed of your computer, how much computing time the learning phase may take. ")
 NORMAL (U"If computing time becomes excessive in your interactive environment then consider using the "
-	"powerful @@Scripting|scripting@ facilities in P\\s{RAAT} to process your learning job as a batch job. ")
+	"powerful @@Scripting|scripting@ facilities in Praat to process your learning job as a batch job. ")
 MAN_END
 
 MAN_BEGIN (U"Feedforward neural networks 1.2. The classification phase", U"djmw", 20040428)
-INTRO (U"In the classification phase the weights of the network are fixed. ")
+INTRO (U"In the classification phase, the weights of the network are fixed. ")
 NORMAL (U"A pattern, presented at the inputs, will be transformed from layer to layer until it reaches the output layer. "
 	"Now classification can occur by selecting the category associated with the output unit that has "
 	"the largest output value.  "
 	"For classification we only need to select an FFNet and a Pattern together and "
-	"choose  @@FFNet & Pattern: To Categories...|To Categories... at . ")
+	"choose @@FFNet & Pattern: To Categories...|To Categories... at . ")
 NORMAL (U"In contrast to the @@Feedforward neural networks 1.1. The learning phase|learning phase@ classification is very fast.")
 MAN_END
 
@@ -131,42 +131,41 @@ INTRO (U"You may create the iris example set with the @@Create iris example...@
 	"that you will find under the ##Neural nets# option in the #New menu. "
 	"Three new objects will appear in the @@List of Objects@: a @FFNet, a @Categories and "
 	"a @Pattern.")
-NORMAL (U"The #Pattern contains the @@iris data set@ in a 150 rows by 4 columns matrix. "
-	"To  guarantee that every cell in the Pattern is in the [0,1] interval, all measurement "
+NORMAL (U"The #Pattern contains the @@iris data set@ in a matrix of 150 rows by 4 columns. "
+	"To guarantee that every cell in the Pattern is in the [0,1] interval, all measurement "
 	"values were divided by 10. In the #Categories the three iris species %setosa, "
 	"%versicolor, and %virginica were categorized with the numbers #1, #2 and #3, respectively. "
 	"Because there are 4 data columns in the Pattern and 3 different iris species in the Categories, "
 	"the newly created #FFNet has 4 inputs and 3 outputs. "
-	"If you have entered a positive number in one of the fields in the form, the FFNet will have "
+	"If you enter a positive number in one of the fields in the form, the FFNet will have "
 	"this number of units in a %%hidden layer%. The name of the newly created FFNet "
-	"will reflect its topology. If you did opt for the default, 0 hidden units, the FFNet will be named 4-3.")
+	"will reflect its topology. If you opt for the standard setting, which is 0 hidden units, the FFNet will be named 4-3.")
 ENTRY (U"Learning the iris data")
 NORMAL (U"The first thing you probably might want to do is to let the #FFNet learn the association in "
-	"each pattern-category pair.  To do this select all three objects together and choose "
+	"each pattern-category pair. To do this select all three objects together and choose "
 	"@@FFNet & Pattern & Categories: Learn...|Learn... at . "
 	"A form will appear, asking you to supply some settings for "
-	"the learning algorithm. Learning starts after you have clicked the OK-button. "
-	"Since the example network does not have too many weights that need to be adjusted and "
-	"the learning data set is very small and computers nowadays are very fast, this will only take a "
-	"very short time.")
-ENTRY (U"Classify")
+	"the learning algorithm. Learning starts after you have clicked the OK button. "
+	"As the example network has only a small number of weights that need to be adjusted, "
+	"and the learning data set is very small, this will only take a very short time.")
+ENTRY (U"Classification")
 NORMAL (U"Now, if you are curious how well the FFNet has learned the iris data, you may select the "
 	"#FFNet and the #Pattern together and choose @@FFNet & Pattern: To Categories...|To Categories... at . "
-	"A new #Categories appears in the ##List of Objects# with the name %4-3_iris (if %%4-3% was the name of the FFNet and %iris% the name of the Pattern). "
+	"A new #Categories appears in the ##List of Objects# with the name %%4-3_iris% (if %%4-3% was the name of the FFNet and %iris% the name of the Pattern). "
 	"We have two different Categories in the list of objects, the topmost one has the original categories, the other "
 	"the categories as were assigned by the FFNet classifier. The obvious thing to do now is to compare the "
 	"original categories with the assigned categories by making a @@Confusion|confusion table at . "
 	"Select the two #Categories and choose @@Categories: To Confusion|To Confusion@ and a newly "
 	"created @Confusion appears. Pressing the @Info button will show you an info window with, "
 	"among others, the fraction correct. ")
-NORMAL (U"You might also want to "
+NORMAL (U"You may also want to "
 	"@@Feedforward neural networks 3. FFNet versus discriminant classifier|compare the FFNet classifier with a discriminant classifier at .")
 ENTRY (U"Create other neural net topologies")
 NORMAL (U"With a #Pattern and a #Categories selected together, you can for example create a new #FFNet of a different topology.")
 MAN_END
 
 MAN_BEGIN (U"Feedforward neural networks 3. FFNet versus discriminant classifier", U"djmw", 20040426)
-NORMAL (U"You might want to compare the FFNet classifier with a discriminant classifier. "
+NORMAL (U"You may want to compare the FFNet classifier with a discriminant classifier. "
 	"Unlike the FFNet, a @@Discriminant|discriminant@ classifier does not need any iterative procedure in the "
 	"learning phase and can be used immediately after creation for classification. "
 	"The following three simple steps will give you the confusion matrix based on discriminant analysis:")
@@ -272,7 +271,6 @@ NORMAL (U"For a network with only one layer, the inputs are connected directly t
 	"In a two-layer network the inputs are connected to a hidden layer.")
 MAN_END
 
-
 MAN_BEGIN (U"FFNet: Get number of hidden units...", U"djmw", 20040420)
 INTRO (U"Queries the selected @FFNet for the number of units in a hidden layer.")
 ENTRY (U"Settings")
diff --git a/artsynth/ArtwordEditor.cpp b/artsynth/ArtwordEditor.cpp
index 9668aca..8c11cbd 100644
--- a/artsynth/ArtwordEditor.cpp
+++ b/artsynth/ArtwordEditor.cpp
@@ -39,8 +39,7 @@ static void updateList (ArtwordEditor me) {
 	Graphics_updateWs (my graphics);
 }
 
-static void gui_button_cb_removeTarget (I, GuiButtonEvent event) {
-	(void) event;
+static void gui_button_cb_removeTarget (I, GuiButtonEvent /* event */) {
 	iam (ArtwordEditor);
 	Artword artword = (Artword) my data;
 	long numberOfSelectedPositions;
@@ -54,8 +53,7 @@ static void gui_button_cb_removeTarget (I, GuiButtonEvent event) {
 	Editor_broadcastDataChanged (me);
 }
 
-static void gui_button_cb_addTarget (I, GuiButtonEvent event) {
-	(void) event;
+static void gui_button_cb_addTarget (I, GuiButtonEvent /* event */) {
 	iam (ArtwordEditor);
 	Artword artword = (Artword) my data;
 	char32 *timeText = GuiText_getString (my time);
diff --git a/contrib/ola/FeatureWeights.cpp b/contrib/ola/FeatureWeights.cpp
index c414aba..a25c9f1 100644
--- a/contrib/ola/FeatureWeights.cpp
+++ b/contrib/ola/FeatureWeights.cpp
@@ -70,7 +70,7 @@ FeatureWeights FeatureWeights_create
 {
 	try {
 		autoFeatureWeights me = Thing_new (FeatureWeights);
-		my fweights = TableOfReal_create (1, nweights);
+		my fweights = TableOfReal_create (1, nweights).transfer();
 		for (long i = 1; i <= nweights; i ++) {
 			my fweights -> data [1] [i] = 1;
 		}
diff --git a/contrib/ola/KNN.cpp b/contrib/ola/KNN.cpp
index 4b6df8e..2e42748 100644
--- a/contrib/ola/KNN.cpp
+++ b/contrib/ola/KNN.cpp
@@ -110,8 +110,8 @@ int KNN_learn
                 forget (my output);
             }
 
-            my input = (Pattern) Data_copy (p);   // LEAK
-            my output = (Categories) Data_copy (c);
+            my input = Data_copy (p);   // LEAK
+            my output = Data_copy (c);
             my nInstances = c->size;
 
             break;
@@ -130,8 +130,10 @@ int KNN_learn
 				/*
 				 * Create without change.
 				 */
-                autoPattern tinput = (Pattern) Matrix_appendRows (my input, p, classPattern).transfer();
-                autoCategories toutput = (Categories) Collections_merge (my output, c);
+				autoMatrix matrix = Matrix_appendRows (my input, p, classPattern);
+                autoPattern tinput = matrix. static_cast_move <structPattern>();
+				autoCollection collection = Collections_merge (my output, c);
+                autoCategories toutput = collection. static_cast_move <structCategories>();
 
 				/*
 				 * Change without error.
@@ -219,10 +221,10 @@ Categories KNN_classifyToCategories
     if (!input)
         return nullptr;
 
-    for(int i = 0; i < nthreads; ++i)
+    for (int i = 0; i < nthreads; ++i)
     {
         input[i] = (KNN_input_ToCategories_t *) malloc(sizeof(KNN_input_ToCategories_t));
-        if(!input[i])
+        if (! input[i])
         {
             while(input[i--])
                 free(input[i]);
@@ -232,7 +234,7 @@ Categories KNN_classifyToCategories
         }
     }
 
-    for(int i = 0; i < nthreads; ++i)
+    for (int i = 0; i < nthreads; ++i)
     {  
         input[i]->me = me;
         input[i]->ps = ps;
@@ -242,7 +244,7 @@ Categories KNN_classifyToCategories
         input[i]->dist = dist;
         input[i]->istart = istart;
 
-        if(istop + chunksize > ps->ny)
+        if (istop + chunksize > ps->ny)
         {  
             input[i]->istop = ps->ny; 
             break;
@@ -417,10 +419,10 @@ TableOfReal KNN_classifyToTableOfReal
     if(!input)
         return nullptr;
 
-    TableOfReal output = TableOfReal_create(ps->ny, ncategories);
+    autoTableOfReal output = TableOfReal_create(ps->ny, ncategories);
 
     for (long i = 1; i <= ncategories; ++i)
-        TableOfReal_setColumnLabel (output, i,  SimpleString_c ((SimpleString) uniqueCategories->item[i]));
+        TableOfReal_setColumnLabel (output.get(), i,  SimpleString_c ((SimpleString) uniqueCategories->item[i]));
 
     for(int i = 0; i < nthreads; ++i)
     {
@@ -439,7 +441,7 @@ TableOfReal KNN_classifyToTableOfReal
     {  
         input[i]->me = me;
         input[i]->ps = ps;
-        input[i]->output = output;
+        input[i]->output = output.get();   // YUCK: reference copy
         input[i]->uniqueCategories = uniqueCategories.transfer();
         input[i]->fws = fws;
         input[i]->k = k;
@@ -469,7 +471,7 @@ TableOfReal KNN_classifyToTableOfReal
         free(error);
         return nullptr;
     }
-    return(output);
+    return output.transfer();
 }
 
 
@@ -485,15 +487,15 @@ void * KNN_classifyToTableOfRealAux
 
 {
     long ncategories = Categories_getSize (((KNN_input_ToTableOfReal_t *) input)->uniqueCategories);
-    long *indices = NUMvector <long> (0, ((KNN_input_ToTableOfReal_t *) input)->k);
-    double *distances = NUMvector <double> (0, ((KNN_input_ToTableOfReal_t *) input)->k);
+    autoNUMvector <long> indices (0L, ((KNN_input_ToTableOfReal_t *) input)->k);
+    autoNUMvector <double> distances (0L, ((KNN_input_ToTableOfReal_t *) input)->k);
 
     for (long y = ((KNN_input_ToTableOfReal_t *) input)->istart; y <= ((KNN_input_ToTableOfReal_t *) input)->istop; ++y)
     {
         KNN_kNeighbours(((KNN_input_ToTableOfReal_t *) input)->ps, 
                         ((KNN_input_ToTableOfReal_t *) input)->me->input, 
                         ((KNN_input_ToTableOfReal_t *) input)->fws, y, 
-                        ((KNN_input_ToTableOfReal_t *) input)->k, indices, distances);
+                        ((KNN_input_ToTableOfReal_t *) input)->k, indices.peek(), distances.peek());
 
         for(long i = 0; i < ((KNN_input_ToTableOfReal_t *) input)->k; ++i)
         {
@@ -548,8 +550,6 @@ void * KNN_classifyToTableOfRealAux
             }
 
     }
-	NUMvector_free (indices, 0);
-	NUMvector_free (distances, 0);
     return nullptr;
 }
 
@@ -621,12 +621,12 @@ Categories KNN_classifyFold
         {
             case kOla_DISTANCE_WEIGHTED_VOTING:
                 for (long c = 0; c < ncategories; c ++)
-                    freqs [c] *= 1 / OlaMAX (distances [c], kOla_MINFLOAT);
+                    freqs [c] *= 1.0 / OlaMAX (distances [c], kOla_MINFLOAT);
                 break;
 
             case kOla_SQUARED_DISTANCE_WEIGHTED_VOTING:
                 for (long c = 0; c < ncategories; c ++)
-                    freqs [c] *= 1 / OlaMAX (OlaSQUARE (distances [c]), kOla_MINFLOAT);
+                    freqs [c] *= 1.0 / OlaMAX (OlaSQUARE (distances [c]), kOla_MINFLOAT);
         }
 
         KNN_normalizeFloatArray (freqs.peek(), ncategories);
@@ -663,7 +663,7 @@ double KNN_evaluate
 )
 
 {
-    double correct = 0;
+    double correct = 0.0;
     long adder;
 
     switch(mode)
@@ -683,7 +683,7 @@ double KNN_evaluate
             adder = 0;
     }
     
-    if (adder ==  0)
+    if (adder == 0)
         return -1;
 
     for (long begin = 1; begin <= my nInstances; begin += adder)
@@ -691,13 +691,11 @@ double KNN_evaluate
         autoCategories c = KNN_classifyFold (me, my input, fws, k, dist, begin, OlaMIN (begin + adder - 1, my nInstances));
         for (long y = 1; y <= c -> size; y ++)
             if (FeatureWeights_areFriends ((SimpleString) c -> item [y], (SimpleString) my output -> item [begin + y - 1])) 
-                ++ correct;
+                correct += 1.0;
     }
 
     correct /= (double) my nInstances;
-
     return correct;
-
 }
 
 /////////////////////////////////////////////////////////////////////////////////////////////
@@ -725,20 +723,11 @@ double KNN_evaluateWithTestSet
 )
 
 {
-    double correct = 0;
-    Categories t = KNN_classifyToCategories(me, p, fws, k, dist);
-
-    if (t)
-    {
-        for (long y = 1; y <= t->size; y++)
-            if (FeatureWeights_areFriends ((SimpleString) t->item[y], (SimpleString) c->item[y])) correct++;
-        forget(t);
-        return(correct / c->size);
-    }
-    else
-    {
-        return(0);
-    }
+    double correct = 0.0;
+    autoCategories t = KNN_classifyToCategories (me, p, fws, k, dist);
+	for (long y = 1; y <= t->size; y++)
+		if (FeatureWeights_areFriends ((SimpleString) t->item[y], (SimpleString) c->item[y])) correct += 1.0;
+	return correct / c->size;
 }
 
 /////////////////////////////////////////////////////////////////////////////////////////////
@@ -784,11 +773,11 @@ double KNN_modelSearch
 		};
 
 		long max = *k;
-		double range = (double) max / 2;
+		double range = (double) max / 2.0;
 		double pivot = range;
 
-		double dpivot = 1;
-		double drange = 1;
+		double dpivot = 1.0;
+		double drange = 1.0;
 		double drate = rate / range;
 
 		soil best = {0, lround(dpivot), lround(dpivot)};
@@ -798,9 +787,9 @@ double KNN_modelSearch
 		{
 			for (long n = 0; n < nseeds; n++)
 			{
-				field[n].k = lround(NUMrandomUniform(OlaMAX(pivot - range, 1), OlaMIN(pivot + range, max)));
-				field[n].dist = lround(NUMrandomUniform(OlaMAX(dpivot - drange, 0), OlaMIN(dpivot + drange, 2)));
-				field[n].performance = KNN_evaluate(me, fws, field[n].k, dists[field[n].dist], mode);
+				field[n].k = lround (NUMrandomUniform (OlaMAX (pivot - range, 1), OlaMIN (pivot + range, max)));
+				field[n].dist = lround (NUMrandomUniform (OlaMAX (dpivot - drange, 0), OlaMIN (dpivot + drange, 2)));
+				field[n].performance = KNN_evaluate (me, fws, field[n].k, dists[field[n].dist], mode);
 			}
 
 			long maxindex = 0;
@@ -848,11 +837,10 @@ double KNN_distanceEuclidean
 )
 
 {
-    double distance = 0;
+    double distance = 0.0;
     for (long x = 1; x <= ps->nx; ++x)
-        distance += OlaSQUARE((ps->z[rows][x] - pt->z[rowt][x]) * fws->fweights->data[1][x]);
-
-    return(sqrt(distance));
+        distance += OlaSQUARE ((ps->z[rows][x] - pt->z[rowt][x]) * fws->fweights->data[1][x]);
+    return sqrt (distance);
 }
 
 /////////////////////////////////////////////////////////////////////////////////////////////
@@ -872,11 +860,10 @@ double KNN_distanceManhattan
 )
 
 {
-    double distance = 0;
+    double distance = 0.0;
     for (long x = 1; x <= ps->nx; ++x)
-        distance += fabs(ps->z[rows][x] - pt->z[rowt][x]);
-
-    return(distance);
+        distance += fabs (ps->z[rows][x] - pt->z[rowt][x]);
+    return distance;
 }
 
 /////////////////////////////////////////////////////////////////////////////////////////////
@@ -893,12 +880,10 @@ long KNN_max
 
 {
     long maxndx = 0;
-
-    for(long maxc = 1; maxc < ndistances; ++maxc)
+    for (long maxc = 1; maxc < ndistances; ++maxc)
         if (distances[maxc] > distances[maxndx]) 
             maxndx = maxc;
-
-    return(maxndx);
+    return maxndx;
 }
 
 
@@ -936,9 +921,9 @@ long KNN_kNeighboursSkip
 
     autoNUMvector <double> distances (0L, k - 1);
 
-    Melder_assert(jy > 0 && jy <= j->ny);
-    Melder_assert(k > 0 && k <= p->ny);
-    Melder_assert(skipper <= p->ny);
+    Melder_assert (jy > 0 && jy <= j->ny);
+    Melder_assert (k > 0 && k <= p->ny);
+    Melder_assert (skipper <= p->ny);
 
     while (dc < k && py <= p -> ny)
     {
@@ -1020,18 +1005,18 @@ long KNN_kNeighboursSkipRange
                                     //
     long py = 0;                    //
 
-    Melder_assert(jy > 0 && jy <= j->ny);
-    Melder_assert(k > 0 && k <= p->ny);
-    Melder_assert(end > 0 && end <= j->ny);
-    Melder_assert(begin > 0 && begin <= j->ny);
+    Melder_assert (jy > 0 && jy <= j->ny);
+    Melder_assert (k > 0 && k <= p->ny);
+    Melder_assert (end > 0 && end <= j->ny);
+    Melder_assert (begin > 0 && begin <= j->ny);
 
     while (dc < k && (end + py) % p->ny + 1 != begin)   // the first k neighbours are the nearest found
     {                                                   // sofar
 
         if ((end + py) % p->ny + 1 != jy)               // no instance is its own neighbour
         {
-            distances[dc] = KNN_distanceEuclidean(j, p, fws, jy, (end + py) % p->ny + 1);
-            indices[dc] = (end + py) % p->ny + 1;
+            distances [dc] = KNN_distanceEuclidean (j, p, fws, jy, (end + py) % p->ny + 1);
+            indices [dc] = (end + py) % p->ny + 1;
             ++dc;
         }
         ++py;
@@ -1045,15 +1030,15 @@ long KNN_kNeighboursSkipRange
             double d = KNN_distanceEuclidean(j, p, fws, jy, (end + py) % p->ny + 1);
             if (d < distances[maxi])
             {
-                distances[maxi] = d;
-                indices[maxi] = (end + py) % p->ny + 1;
-                maxi = KNN_max(distances, k);
+                distances [maxi] = d;
+                indices [maxi] = (end + py) % p->ny + 1;
+                maxi = KNN_max (distances, k);
             }
         }
         ++py;
     }
 
-    return(OlaMIN(k, dc)); // return the number of found neighbours
+    return OlaMIN (k, dc); // return the number of found neighbours
 
 }
 
@@ -1091,16 +1076,16 @@ long KNN_kNeighbours
     long dc = 0;
     long py = 1;
 
-    Melder_assert(jy > 0 && jy <= j->ny);
-    Melder_assert(k > 0 && k <= p->ny);
-    Melder_assert(indices);
-    Melder_assert(distances);
+    Melder_assert (jy > 0 && jy <= j->ny);
+    Melder_assert (k > 0 && k <= p->ny);
+    Melder_assert (indices);
+    Melder_assert (distances);
 
     while (dc < k && py <= p->ny)
     {
         if (py != jy)
         {
-            distances[dc] = KNN_distanceEuclidean(j, p, fws, jy, py);
+            distances[dc] = KNN_distanceEuclidean (j, p, fws, jy, py);
             indices[dc] = py;
             ++dc;
         }
@@ -1112,25 +1097,25 @@ long KNN_kNeighbours
     {
         if (py != jy)
         {
-            double d = KNN_distanceEuclidean(j, p, fws, jy, py);
-            if (d < distances[maxi])
+            double d = KNN_distanceEuclidean (j, p, fws, jy, py);
+            if (d < distances [maxi])
             {
-                distances[maxi] = d;
-                indices[maxi] = py;
-                maxi = KNN_max(distances, k);
+                distances [maxi] = d;
+                indices [maxi] = py;
+                maxi = KNN_max (distances, k);
             }
         }
         ++py;
     }
 
-    long ret = OlaMIN(k, dc);
+    long ret = OlaMIN (k, dc);
     if (ret < 1)
     {
-        indices[0] = jy;
-        return(0);
+        indices [0] = jy;
+        return 0;
     }
     else
-        return(ret);
+        return ret;
 }
 
 /////////////////////////////////////////////////////////////////////////////////////////////
@@ -1162,40 +1147,39 @@ long KNN_kFriends
     long maxi;
     long dc = 0;
     long py = 1;
-    double *distances = NUMvector <double> (0, k - 1);
+    autoNUMvector <double> distances (0L, k - 1);
 
-    Melder_assert(jy <= j->ny  && k <= p->ny && k > 0);
-    Melder_assert(indices);
+    Melder_assert (jy <= j->ny  && k <= p->ny && k > 0);
+    Melder_assert (indices);
 
     while (dc < k && py < p->ny)
     {
         if (jy != py && FeatureWeights_areFriends ((SimpleString) c->item[jy], (SimpleString) c->item[py]))
         {
-            distances[dc] = KNN_distanceManhattan(j, p, jy, py);
+            distances[dc] = KNN_distanceManhattan (j, p, jy, py);
             indices[dc] = py;
             dc++;
         }
         ++py;
     }
 
-    maxi = KNN_max(distances, k);
+    maxi = KNN_max (distances.peek(), k);
     while (py <= p->ny)
     {
         if (jy != py && FeatureWeights_areFriends ((SimpleString) c->item[jy],(SimpleString) c->item[py]))
         {
-            double d = KNN_distanceManhattan(j, p, jy, py);
-            if (d < distances[maxi])
+            double d = KNN_distanceManhattan (j, p, jy, py);
+            if (d < distances [maxi])
             {
-                distances[maxi] = d;
-                indices[maxi] = py;
-                maxi = KNN_max(distances, k);
+                distances [maxi] = d;
+                indices [maxi] = py;
+                maxi = KNN_max (distances.peek(), k);
             }
         }
         ++py;
     }
 
-	NUMvector_free (distances, 0);
-    return(OlaMIN(k,dc));
+    return OlaMIN (k, dc);
 
 }
 
@@ -1231,8 +1215,7 @@ double KNN_nearestEnemy
             if (newdist > distance) distance = newdist;
         }
     }
-
-    return(distance);
+    return distance;
 
 }
 
@@ -1272,7 +1255,7 @@ long KNN_friendsAmongkNeighbours
     while (ncollected--)
         if (FeatureWeights_areFriends ((SimpleString) c->item[jy], (SimpleString) c->item[indices[ncollected]])) friends++;
     
-    return friends ;
+    return friends;
 
 }
 
@@ -1353,7 +1336,7 @@ long KNN_kUniqueEnemies
         ++py;
     }
 	NUMvector_free (distances, 0);
-    return(OlaMIN(k,dc));
+    return OlaMIN (k, dc);
 }
 
 /////////////////////////////////////////////////////////////////////////////////////////////
@@ -1560,7 +1543,7 @@ void KNN_shuffleInstances
 /////////////////////////////////////////////////////////////////////////////////////////////
 // KNN to Permutation (experimental)                                                       //
 /////////////////////////////////////////////////////////////////////////////////////////////
-Permutation KNN_SA_ToPermutation
+autoPermutation KNN_SA_ToPermutation
 (
     ///////////////////////////////
     // Parameters                //
@@ -1589,7 +1572,7 @@ Permutation KNN_SA_ToPermutation
     const gsl_rng_type * T;
 
     KNN_SA_t * istruct = KNN_SA_t_create(my input); 
-    Permutation result = Permutation_create(my nInstances);
+    autoPermutation result = Permutation_create(my nInstances);
 
     gsl_siman_params_t params = { (int) tries, (int) iterations, step_size, boltzmann_c, temp_start, damping_f, temp_stop};
 
@@ -1614,7 +1597,7 @@ Permutation KNN_SA_ToPermutation
 
     KNN_SA_t_destroy(istruct);
 
-    return(result);
+    return result;
 }
 
 
diff --git a/contrib/ola/KNN.h b/contrib/ola/KNN.h
index e535d6b..329f464 100644
--- a/contrib/ola/KNN.h
+++ b/contrib/ola/KNN.h
@@ -345,7 +345,7 @@ void KNN_shuffleInstances
 );
 
 // Experimental code
-Permutation KNN_SA_ToPermutation
+autoPermutation KNN_SA_ToPermutation
 (
     KNN me,             // the classifier being used
     long tries,         //
diff --git a/contrib/ola/KNN_def.h b/contrib/ola/KNN_def.h
index 1d0faa2..52bf5b8 100644
--- a/contrib/ola/KNN_def.h
+++ b/contrib/ola/KNN_def.h
@@ -1,6 +1,6 @@
 /* KNN_def.h
  *
- * Copyright (C) 2007-2009 Ola Söder, 2011 Paul Boersma
+ * Copyright (C) 2007-2009 Ola Söder, 2011,2015 Paul Boersma
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -27,8 +27,8 @@ oo_DEFINE_CLASS (KNN, Daata)
 	oo_OBJECT (Categories, 0, output)
 
 	#if oo_DECLARING
-		// overridden methods:
-			virtual void v_info ();
+		void v_info ()
+			override;
 	#endif
 
 oo_END_CLASS (KNN)
diff --git a/dwsys/Collection_extensions.cpp b/dwsys/Collection_extensions.cpp
index 85f3296..7fe6389 100644
--- a/dwsys/Collection_extensions.cpp
+++ b/dwsys/Collection_extensions.cpp
@@ -30,7 +30,7 @@
 #include "Simple_extensions.h"
 #include "NUM2.h"
 
-Collection Collection_and_Permutation_permuteItems (Collection me, Permutation him) {
+autoCollection Collection_and_Permutation_permuteItems (Collection me, Permutation him) {
 	try {
 		if (my size != his numberOfElements) {
 			Melder_throw (me, U"The number of elements are not equal.");
@@ -58,18 +58,18 @@ Collection Collection_and_Permutation_permuteItems (Collection me, Permutation h
 			pos[where] = ti;
 			pos[which] = which <= i ? i : ti;
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not permuted.");
 	}
 }
 
-Collection Collection_permuteItems (Collection me) {
+autoCollection Collection_permuteItems (Collection me) {
 	try {
 		autoPermutation p = Permutation_create (my size);
 		Permutation_permuteRandomly_inline (p.peek(), 0, 0);
 		autoCollection thee = Collection_and_Permutation_permuteItems (me, p.peek());
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": items not permuted.");
 	}
@@ -91,11 +91,11 @@ int OrderedOfString_init (OrderedOfString me, long initialCapacity) {
 	return 1;
 }
 
-OrderedOfString OrderedOfString_create () {
+autoOrderedOfString OrderedOfString_create () {
 	try {
 		autoOrderedOfString me = Thing_new (OrderedOfString);
 		OrderedOfString_init (me.peek(), 10);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"OrderedOfString not created.");
 	}
@@ -114,7 +114,7 @@ int OrderedOfString_append (OrderedOfString me, char32 *append) {
 	}
 }
 
-OrderedOfString OrderedOfString_joinItems (OrderedOfString me, OrderedOfString thee) {
+autoOrderedOfString OrderedOfString_joinItems (OrderedOfString me, OrderedOfString thee) {
 	try {
 		if (my size != thy size) {
 			Melder_throw (U"sizes must be equal.");
@@ -124,14 +124,14 @@ OrderedOfString OrderedOfString_joinItems (OrderedOfString me, OrderedOfString t
 		for (long i = 1; i <= my size; i++) {
 			SimpleString_append ( (SimpleString) his item[i], (SimpleString) thy item[i]);
 		}
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (U"Items not joinmed.");
 	}
 }
 
 
-OrderedOfString OrderedOfString_selectUniqueItems (OrderedOfString me, int sort) {
+autoOrderedOfString OrderedOfString_selectUniqueItems (OrderedOfString me, int sort) {
 	try {
 		if (! sort) {
 			autoOrderedOfString him = OrderedOfString_create ();
@@ -143,7 +143,7 @@ OrderedOfString OrderedOfString_selectUniqueItems (OrderedOfString me, int sort)
 				}
 			}
 			Collection_shrinkToFit (him.peek());
-			return him.transfer();
+			return him;
 		}
 		autoSortedSetOfString thee = SortedSetOfString_create ();
 		/* Collection_to_SortedSet (I, int (*compare)(I, thou)) */
@@ -158,7 +158,7 @@ OrderedOfString OrderedOfString_selectUniqueItems (OrderedOfString me, int sort)
 			autoSimpleString item = Data_copy ( (SimpleString) thy item[i]);
 			Collection_addItem (him.peek(), item.transfer());
 		}
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (me, U": unique items not selected.");
 	}
diff --git a/dwsys/Collection_extensions.h b/dwsys/Collection_extensions.h
index 341f8bb..0a411ce 100644
--- a/dwsys/Collection_extensions.h
+++ b/dwsys/Collection_extensions.h
@@ -2,7 +2,7 @@
 #define _Collection_extensions_h_
 /* Collection_extensions.h
  *
- * Copyright (C) 1994-2002 David Weenink
+ * Copyright (C) 1994-2002, 2015 David Weenink
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -28,8 +28,9 @@
 #include "Graphics.h"
 #include "Permutation.h"
 
-Collection Collection_and_Permutation_permuteItems (Collection me, Permutation him);
-Collection Collection_permuteItems (Collection me);
+autoCollection Collection_and_Permutation_permuteItems (Collection me, Permutation him);
+
+autoCollection Collection_permuteItems (Collection me);
 /* permute the order of my items */
 
 /****************** class OrderedOfString ******************/
@@ -39,14 +40,16 @@ Thing_define (OrderedOfString, Ordered) {
 		override;
 };
 
-OrderedOfString OrderedOfString_create ();
+autoOrderedOfString OrderedOfString_create ();
+
 int OrderedOfString_init (OrderedOfString me, long initialCapacity);
 
 int OrderedOfString_append (OrderedOfString me, char32 *append);
-OrderedOfString OrderedOfString_joinItems (OrderedOfString me, OrderedOfString thee);
+
+autoOrderedOfString OrderedOfString_joinItems (OrderedOfString me, OrderedOfString thee);
 /* Join each item */
 
-OrderedOfString OrderedOfString_selectUniqueItems (OrderedOfString me, int sort);
+autoOrderedOfString OrderedOfString_selectUniqueItems (OrderedOfString me, int sort);
 /* Postcondition: thy size <= my size */
 
 void OrderedOfString_frequency (OrderedOfString me, OrderedOfString thee, long *count);
diff --git a/dwsys/Command.cpp b/dwsys/Command.cpp
index 08d0ed4..edf5b13 100644
--- a/dwsys/Command.cpp
+++ b/dwsys/Command.cpp
@@ -1,6 +1,6 @@
 /* Command.cpp
  *
- * Copyright (C) 1994-2011 David Weenink
+ * Copyright (C) 1994-2011, 2015 David Weenink
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -49,11 +49,11 @@ int Command_undo (I) {
 
 Thing_implement (CommandHistory, Ordered, 0);
 
-CommandHistory CommandHistory_create (long maximumCapacity) {
+autoCommandHistory CommandHistory_create (long maximumCapacity) {
 	try {
 		autoCommandHistory me = Thing_new (CommandHistory);
 		Collection_init (me.peek(), classCommand, maximumCapacity);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Command not created.");
 	}
diff --git a/dwsys/Command.h b/dwsys/Command.h
index 762aa2a..26de5ad 100644
--- a/dwsys/Command.h
+++ b/dwsys/Command.h
@@ -2,7 +2,7 @@
 #define _Command_h_
 /* Command.h
  *
- * Copyright (C) 1994-2011 David Weenink
+ * Copyright (C) 1994-2011, 2015 David Weenink
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ Thing_define (CommandHistory, Ordered) {
 /* Invariants: */
 /*	0 <= current <= size + 1; */
 
-CommandHistory CommandHistory_create (long maximumCapacity);
+autoCommandHistory CommandHistory_create (long maximumCapacity);
 
 void CommandHistory_forth (I);
 /* Precondition: ! offright */
diff --git a/dwsys/Eigen.cpp b/dwsys/Eigen.cpp
index d567e00..84f9897 100644
--- a/dwsys/Eigen.cpp
+++ b/dwsys/Eigen.cpp
@@ -151,8 +151,7 @@ void Eigen_initFromSquareRoot (I, double **a, long numberOfRows, long numberOfCo
 	Eigen_sort (me);
 }
 
-void Eigen_initFromSquareRootPair (I, double **a, long numberOfRows,
-                                   long numberOfColumns, double **b, long numberOfRows_b) {
+void Eigen_initFromSquareRootPair (I, double **a, long numberOfRows, long numberOfColumns, double **b, long numberOfRows_b) {
 	iam (Eigen);
 	double *u = nullptr, *v = nullptr, maxsv2 = -10.0;
 	char jobu = 'N', jobv = 'N', jobq = 'Q';
@@ -277,11 +276,11 @@ void Eigen_initFromSymmetricMatrix (I, double **a, long n) {
 	}
 }
 
-Eigen Eigen_create (long numberOfEigenvalues, long dimension) {
+autoEigen Eigen_create (long numberOfEigenvalues, long dimension) {
 	try {
 		autoEigen me = Thing_new (Eigen);
 		Eigen_init (me.peek(), numberOfEigenvalues, dimension);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Eigen not created.");
 	}
diff --git a/dwsys/Eigen.h b/dwsys/Eigen.h
index 57604ce..a6989e6 100644
--- a/dwsys/Eigen.h
+++ b/dwsys/Eigen.h
@@ -2,7 +2,7 @@
 #define _Eigen_h_
 /* Eigen.h
  *
- * Copyright (C) 1993-2012 David Weenink
+ * Copyright (C) 1993-2012, 2015 David Weenink
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -32,15 +32,15 @@
 #include "Eigen_def.h"
 oo_CLASS_CREATE (Eigen, Daata);
 
-Eigen Eigen_create (long numberOfEigenvalues, long dimension);
+autoEigen Eigen_create (long numberOfEigenvalues, long dimension);
 
 void Eigen_init (I, long numberOfEigenvalues, long dimension);
 
 void Eigen_initFromSymmetricMatrix_f (I, float **a, long n);
+
 void Eigen_initFromSymmetricMatrix (I, double **a, long n);
 
-void Eigen_initFromSquareRoot (I, double **a, long numberOfRows,
-	long numberOfColumns);
+void Eigen_initFromSquareRoot (I, double **a, long numberOfRows, long numberOfColumns);
 /*
 	Calculate eigenstructure for symmetric matrix A'A (e.g. covariance matrix),
 	when only A is given.
@@ -48,8 +48,7 @@ void Eigen_initFromSquareRoot (I, double **a, long numberOfRows,
 	Method: SVD.
 */
 
-void Eigen_initFromSquareRootPair (I, double **a, long numberOfRows,
-	long numberOfColumns, double **b, long numberOfRows_b);
+void Eigen_initFromSquareRootPair (I, double **a, long numberOfRows, long numberOfColumns, double **b, long numberOfRows_b);
 /*
 	Calculate eigenstructure for A'Ax - lambda B'Bx = 0
 	Preconditions: numberOfRows >= numberOfColumns &&
@@ -80,9 +79,8 @@ void Eigen_invertEigenvector (I, long ivec);
 void Eigen_drawEigenvalues (I, Graphics g, long first, long last, double ymin, double ymax,
 	int fractionOfTotal, int cumulative, double size_mm, const char32 *mark, int garnish);
 
-void Eigen_drawEigenvector (I, Graphics g, long ivec, long first, long last,
-	double minimum, double maximum, int weigh, double size_mm, const char32 *mark,
-	int connect, char32 **rowLabels, int garnish);
+void Eigen_drawEigenvector (I, Graphics g, long ivec, long first, long last, double minimum, double maximum, int weigh, 
+	double size_mm, const char32 *mark, int connect, char32 **rowLabels, int garnish);
 /*
 	Draw eigenvector. When rowLabels != nullptr, draw row text labels on bottom axis.
 */
diff --git a/dwsys/FileInMemory.cpp b/dwsys/FileInMemory.cpp
index 97ce4c3..dbd0a39 100644
--- a/dwsys/FileInMemory.cpp
+++ b/dwsys/FileInMemory.cpp
@@ -80,7 +80,7 @@ FileInMemory FileInMemory_createWithData (long numberOfBytes, const char *data,
 		my d_id = Melder_dup (id);
 		my d_numberOfBytes = numberOfBytes;
 		my d_data = const_cast<char *> (data); // copy pointer to data only
-		return me.transfer ();
+		return me.transfer();
 	} catch (MelderError) {
 		Melder_throw (U"FileInMemory not create from data.");
 	}
diff --git a/dwsys/FileInMemory.h b/dwsys/FileInMemory.h
index 0b40a8f..7f204d3 100644
--- a/dwsys/FileInMemory.h
+++ b/dwsys/FileInMemory.h
@@ -2,7 +2,7 @@
 #define _FileInMemory_h_
 /* FileInMemory.h
  *
- * Copyright (C) 2011-2012 David Weenink
+ * Copyright (C) 2011-2012, 2015 David Weenink
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -43,9 +43,11 @@ Thing_define (FileInMemory, Daata) {
 };
 
 FileInMemory FileInMemory_create (MelderFile file);
+
 FileInMemory FileInMemory_createWithData (long numberOfBytes, const char *data, const char32 *path, const char32 *id);
 
 void FileInMemory_dontOwnData (FileInMemory me);
+
 void FileInMemory_setId (FileInMemory me, const char32 *newId);
 
 void FileInMemory_showAsCode (FileInMemory me, const char32 *name, long numberOfBytesPerLine);
@@ -60,14 +62,19 @@ Thing_define (FilesInMemory, SortedSet) {
 };
 
 FilesInMemory FilesInMemory_create ();
+
 FilesInMemory FilesInMemory_createFromDirectoryContents (const char32 *dirpath, const char32 *file);
 
 void FilesInMemory_showAsCode (FilesInMemory me, const char32 *name, long numberOfBytesPerLine);
+
 void FilesInMemory_showOneFileAsCode (FilesInMemory me, long index, const char32 *name, long numberOfBytesPerLine);
 
 long FilesInMemory_getIndexFromId (FilesInMemory me, const char32 *id);
+
 Strings FilesInMemory_to_Strings_id (FilesInMemory me);
+
 char * FilesInMemory_getCopyOfData (FilesInMemory me, const char32 *id, long *numberOfBytes);
+
 const char * FilesInMemory_getData (FilesInMemory me, const char32 *id, long *numberOfBytes);
 
 #endif // _FileInMemory_h_
diff --git a/dwsys/Index.cpp b/dwsys/Index.cpp
index 479af9e..9376705 100644
--- a/dwsys/Index.cpp
+++ b/dwsys/Index.cpp
@@ -56,8 +56,7 @@ void structIndex :: v_info () {
 	MelderInfo_writeLine (U"Number of elements: ", numberOfElements);
 }
 
-void Index_init (I, long numberOfElements) {
-	iam (Index);
+void Index_init (Index me, long numberOfElements) {
 	if (numberOfElements < 1) {
 		Melder_throw (U"Cannot create index without elements.");
 	}
@@ -66,8 +65,7 @@ void Index_init (I, long numberOfElements) {
 	my classIndex = NUMvector<long> (1, numberOfElements);
 }
 
-Index Index_extractPart (I, long from, long to) {
-	iam (Index);
+autoIndex Index_extractPart (Index me, long from, long to) {
 	try {
 		if (from == 0) {
 			from = 1;
@@ -84,7 +82,7 @@ Index Index_extractPart (I, long from, long to) {
 		for (long i = 1; i <= thy numberOfElements; i++) {
 			thy classIndex[i] = my classIndex[from + i - 1];
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": part not extracted.");
 	}
@@ -92,11 +90,11 @@ Index Index_extractPart (I, long from, long to) {
 
 Thing_implement (StringsIndex, Index, 0);
 
-StringsIndex StringsIndex_create (long numberOfElements) {
+autoStringsIndex StringsIndex_create (long numberOfElements) {
 	try {
 		autoStringsIndex me = (StringsIndex) Thing_new (StringsIndex);
 		Index_init (me.peek(), numberOfElements);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"StringsIndex not created.");
 	}
@@ -114,9 +112,11 @@ int StringsIndex_getClass (StringsIndex me, char32 *klasLabel) {
 
 long StringsIndex_countItems (StringsIndex me, int iclass) {
 	long sum = 0;
-	for (long i = 1; i <= my numberOfElements; i++) if (my classIndex[i] == iclass) {
+	for (long i = 1; i <= my numberOfElements; i++) {
+		if (my classIndex[i] == iclass) {
 			sum++;
 		}
+	}
 	return sum;
 }
 
diff --git a/dwsys/Index.h b/dwsys/Index.h
index 74cd631..99d3e6a 100644
--- a/dwsys/Index.h
+++ b/dwsys/Index.h
@@ -25,11 +25,11 @@
 oo_CLASS_CREATE (Index, Daata);
 oo_CLASS_CREATE (StringsIndex, Index);
 
-void Index_init (I, long numberOfElements);
+void Index_init (Index me, long numberOfElements);
 
-Index Index_extractPart (I, long from, long to);
+autoIndex Index_extractPart (Index me, long from, long to);
 
-StringsIndex StringsIndex_create (long numberOfElements);
+autoStringsIndex StringsIndex_create (long numberOfElements);
 
 int StringsIndex_getClass (StringsIndex me, char32 *classLabel);
 
diff --git a/dwsys/Index_def.h b/dwsys/Index_def.h
index 55ef67d..703a431 100644
--- a/dwsys/Index_def.h
+++ b/dwsys/Index_def.h
@@ -1,6 +1,6 @@
 /* Index_def.h
  *
- * Copyright (C) 2005-2006 David Weenink
+ * Copyright (C) 2005-2006, 2015 David Weenink
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
 
 #define ooSTRUCT Index
 oo_DEFINE_CLASS (Index, Daata)
-	oo_OBJECT (Ordered, 0, classes)
+	oo_AUTO_OBJECT (Ordered, 0, classes)
 	oo_LONG (numberOfElements)
 	oo_LONG_VECTOR (classIndex, numberOfElements)
 
diff --git a/dwsys/Permutation.cpp b/dwsys/Permutation.cpp
index 790036a..b6d45e8 100644
--- a/dwsys/Permutation.cpp
+++ b/dwsys/Permutation.cpp
@@ -92,11 +92,11 @@ void Permutation_init (Permutation me, long numberOfElements) {
 	Permutation_sort (me);
 }
 
-Permutation Permutation_create (long numberOfElements) {
+autoPermutation Permutation_create (long numberOfElements) {
 	try {
 		autoPermutation me = Thing_new (Permutation);
 		Permutation_init (me.peek(), numberOfElements);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Permulation not created.");
 	}
@@ -150,8 +150,9 @@ void Permutation_swapNumbers (Permutation me, long i1, long i2) {
 
 void Permutation_swapBlocks (Permutation me, long from, long to, long blocksize) {
 	try {
-		if (blocksize < 1 || blocksize > my numberOfElements) Melder_throw
-			(U"Blocksize must be in [1, %d] range.", my numberOfElements / 2);
+		if (blocksize < 1 || blocksize > my numberOfElements) {
+			Melder_throw (U"Blocksize must be in [1, %d] range.", my numberOfElements / 2);
+		}
 		if (from < 0 || from + blocksize - 1 > my numberOfElements || to < 0 || to + blocksize - 1 > my numberOfElements) {
 			Melder_throw (U"Start and finish positions of the two blocks must be in [1,", my numberOfElements, U"] range.");
 		}
@@ -187,17 +188,17 @@ void Permutation_permuteRandomly_inline (Permutation me, long from, long to) {
 	}
 }
 
-Permutation Permutation_permuteRandomly (Permutation me, long from, long to) {
+autoPermutation Permutation_permuteRandomly (Permutation me, long from, long to) {
 	try {
 		autoPermutation thee = Data_copy (me);
 		Permutation_permuteRandomly_inline (thee.peek(), from, to);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not permuted.");
 	}
 }
 
-Permutation Permutation_rotate (Permutation me, long from, long to, long step) {
+autoPermutation Permutation_rotate (Permutation me, long from, long to, long step) {
 	try {
 		long n = Permutation_checkRange (me, &from, &to);
 		step = (step - 1) % n + 1;
@@ -213,7 +214,7 @@ Permutation Permutation_rotate (Permutation me, long from, long to, long step) {
 			}
 			thy p[ifrom] = my p[i];
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not rotated.");
 	}
@@ -238,23 +239,22 @@ void Permutation_swapOneFromRange (Permutation me, long from, long to, long pos,
 	}
 }
 
-Permutation Permutation_permuteBlocksRandomly (Permutation me, long from, long to, long blocksize,
-        int permuteWithinBlocks, int noDoublets) {
+autoPermutation Permutation_permuteBlocksRandomly (Permutation me, long from, long to, long blocksize, int permuteWithinBlocks, int noDoublets) {
 	try {
 		long n = Permutation_checkRange (me, &from, &to);
 		if (blocksize == 1 || (blocksize >= n && permuteWithinBlocks)) {
 			autoPermutation thee = Permutation_permuteRandomly (me, from, to);
-			return thee.transfer();
+			return thee;
 		}
 		autoPermutation thee = Data_copy (me);
 		if (blocksize >= n) {
-			return thee.transfer();
+			return thee;
 		}
 
 		long nblocks  = n / blocksize, nrest = n % blocksize;
-		if (nrest != 0) Melder_throw (U"It is not possible to fit an integer number of blocks "
-			U"in the range.\n(The last block is only of size ", nrest, U").");
-
+		if (nrest != 0) {
+			Melder_throw (U"It is not possible to fit an integer number of blocks in the range.\n(The last block is only of size ", nrest, U").");
+		}
 		autoPermutation pblocks = Permutation_create (nblocks);
 
 		Permutation_permuteRandomly_inline (pblocks.peek(), 1, nblocks);
@@ -275,13 +275,13 @@ Permutation Permutation_permuteBlocksRandomly (Permutation me, long from, long t
 				}
 			}
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not permuted block randomly.");
 	}
 }
 
-Permutation Permutation_interleave (Permutation me, long from, long to, long blocksize, long offset) {
+autoPermutation Permutation_interleave (Permutation me, long from, long to, long blocksize, long offset) {
 	try {
 		long n = Permutation_checkRange (me, &from, &to);
 		long nblocks = n / blocksize;
@@ -296,35 +296,33 @@ Permutation Permutation_interleave (Permutation me, long from, long to, long blo
 
 		autoPermutation thee = Data_copy (me);
 
-		if (nblocks == 1) {
-			return thee.transfer();
-		}
-
-		autoNUMvector<long> occupied (1, blocksize);
+		if (nblocks > 1) {
+			autoNUMvector<long> occupied (1, blocksize);
 
-		long posinblock = 1 - offset;
-		for (long i = 1; i <= n; i++) {
-			long index, rblock = (i - 1) % nblocks + 1;
+			long posinblock = 1 - offset;
+			for (long i = 1; i <= n; i++) {
+				long index, rblock = (i - 1) % nblocks + 1;
 
-			posinblock += offset;
-			if (posinblock > blocksize) {
-				posinblock -= blocksize;
-			}
+				posinblock += offset;
+				if (posinblock > blocksize) {
+					posinblock -= blocksize;
+				}
 
-			if (i % nblocks == 1) {
-				long count = blocksize;
-				while (occupied[posinblock] == 1 && count > 0) {
-					posinblock++; count--;
-					if (posinblock > blocksize) {
-						posinblock -= blocksize;
+				if (i % nblocks == 1) {
+					long count = blocksize;
+					while (occupied[posinblock] == 1 && count > 0) {
+						posinblock++; count--;
+						if (posinblock > blocksize) {
+							posinblock -= blocksize;
+						}
 					}
+					occupied[posinblock] = 1;
 				}
-				occupied[posinblock] = 1;
+				index = from - 1 + (rblock - 1) * blocksize + posinblock;
+				thy p[from - 1 + i] = my p[index];
 			}
-			index = from - 1 + (rblock - 1) * blocksize + posinblock;
-			thy p[from - 1 + i] = my p[index];
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not interleaved.");
 	}
@@ -343,26 +341,26 @@ long Permutation_getIndexAtValue (Permutation me, long value) {
 	return -1;
 }
 
-Permutation Permutation_invert (Permutation me) {
+autoPermutation Permutation_invert (Permutation me) {
 	try {
 		autoPermutation thee = Data_copy (me);
 		for (long i = 1; i <= my numberOfElements; i++) {
 			thy p[my p[i]] = i;
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not inverted.");
 	}
 }
 
-Permutation Permutation_reverse (Permutation me, long from, long to) {
+autoPermutation Permutation_reverse (Permutation me, long from, long to) {
 	try {
 		long n = Permutation_checkRange (me, &from, &to);
 		autoPermutation thee = Data_copy (me);
 		for (long i = 1; i <= n; i++) {
 			thy p[from + i - 1] = my p[to - i + 1];
 		}
-		return thee.transfer();
+		return thee;
 
 	} catch (MelderError) {
 		Melder_throw (me, U": not reversed.");
@@ -410,7 +408,6 @@ void Permutation_next_inline (Permutation me) {
 /* Replaces p with the previous permutation (in the standard lexicographical ordering.
    Adapted from the GSL library
 */
-
 void Permutation_previous_inline (Permutation me) {
 	long size = my numberOfElements;
 	long *p = & my p[1];
@@ -446,7 +443,7 @@ void Permutation_previous_inline (Permutation me) {
 	}
 }
 
-Permutation Permutations_multiply2 (Permutation me, Permutation thee) {
+autoPermutation Permutations_multiply2 (Permutation me, Permutation thee) {
 	try {
 		if (my numberOfElements != thy numberOfElements) {
 			Melder_throw (U"Number of elements must be equal.");
@@ -455,22 +452,22 @@ Permutation Permutations_multiply2 (Permutation me, Permutation thee) {
 		for (long i = 1; i <= my numberOfElements; i++) {
 			his p[i] = my p[thy p[i]];
 		}
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (me, U" & ", thee, U" not multiplied.");
 	}
 }
 
-Permutation Permutations_multiply (Collection me) {
+autoPermutation Permutations_multiply (Collection me) {
 	try {
 		if (my size < 2) {
 			Melder_throw (U"There must be at least 2 Permutations in the set.");
 		}
-		autoPermutation thee = Permutations_multiply2 ( (Permutation) my item[1], (Permutation) my item[2]);
+		autoPermutation thee = Permutations_multiply2 ((Permutation) my item[1], (Permutation) my item[2]);
 		for (long i = 3; i <= my size; i++) {
-			thee.reset (Permutations_multiply2 (thee.peek(), (Permutation) my item[i]));
+			thee = Permutations_multiply2 (thee.peek(), (Permutation) my item[i]);
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (U"Permutations not multiplied.");
 	}
diff --git a/dwsys/Permutation.h b/dwsys/Permutation.h
index 87baef9..7ba3579 100644
--- a/dwsys/Permutation.h
+++ b/dwsys/Permutation.h
@@ -2,7 +2,7 @@
 #define _Permutation_h_
 /* Permutation.h
  *
- * Copyright (C) 2005-2011 David Weenink
+ * Copyright (C) 2005-2011, 2015 David Weenink
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ oo_CLASS_CREATE (Permutation, Daata);
 
 void Permutation_init (Permutation me, long numberOfElements);
 
-Permutation Permutation_create (long numberOfElements);
+autoPermutation Permutation_create (long numberOfElements);
 /*
 	Create the Permutation data structure and fill
 		with the identical permutation (1,2,..n)
@@ -46,10 +46,10 @@ void Permutation_sort (Permutation me);
 
 void Permutation_permuteRandomly_inline (Permutation me, long from, long to);
 
-Permutation Permutation_permuteRandomly (Permutation me, long from, long to);
+autoPermutation Permutation_permuteRandomly (Permutation me, long from, long to);
 /* Generate a new sequence by permuting the elements from..to */
 
-Permutation Permutation_rotate (Permutation me, long from, long to, long step);
+autoPermutation Permutation_rotate (Permutation me, long from, long to, long step);
 
 void Permutation_swapOneFromRange (Permutation me, long from, long to, long pos, int forbidsame);
 /* Swap item at pos with one randomly chosen in interval [from,to]. If pos in [from,to]
@@ -59,11 +59,12 @@ void Permutation_swapBlocks (Permutation me, long from, long to, long blocksize)
 /* Swap two blocks */
 
 void Permutation_swapPositions (Permutation me, long i1, long i2);
+
 void Permutation_swapNumbers (Permutation me, long i1, long i2);
-Permutation Permutation_interleave (Permutation me, long from, long to, long blocksize, long offset);
 
-Permutation Permutation_permuteBlocksRandomly (Permutation me, long from, long to, long blocksize,
-	int permuteWithinBlocks, int noDoublets);
+autoPermutation Permutation_interleave (Permutation me, long from, long to, long blocksize, long offset);
+
+autoPermutation Permutation_permuteBlocksRandomly (Permutation me, long from, long to, long blocksize, int permuteWithinBlocks, int noDoublets);
 /* Permute blocks of size blocksize randomly. If permuteWithinBlocks=true and noDoublets=true forbid that the last
 	number in a block and the first number in the following block are 'equal modulo blocksize'. */
 
@@ -73,16 +74,18 @@ long Permutation_getValueAtIndex (Permutation me, long i);
 long Permutation_getIndexAtValue (Permutation me, long value);
 /* Find i for which p[i] = value */
 
-Permutation Permutation_invert (Permutation me);
+autoPermutation Permutation_invert (Permutation me);
 /*  */
 
-Permutation Permutation_reverse (Permutation me, long from, long to);
+autoPermutation Permutation_reverse (Permutation me, long from, long to);
 /* (n1,n2,...nn) to (nn,...n2,n1) */
 
 void Permutation_next_inline (Permutation me);
+
 void Permutation_previous_inline (Permutation me);
 
-Permutation Permutations_multiply2 (Permutation me, Permutation thee);
-Permutation Permutations_multiply (Collection me);
+autoPermutation Permutations_multiply2 (Permutation me, Permutation thee);
+
+autoPermutation Permutations_multiply (Collection me);
 
 #endif /* _Permutation_h_ */
diff --git a/dwtools/CategoriesEditor.cpp b/dwtools/CategoriesEditor.cpp
index 2ba8f5e..9768e73 100644
--- a/dwtools/CategoriesEditor.cpp
+++ b/dwtools/CategoriesEditor.cpp
@@ -428,7 +428,7 @@ static void update_dos (I) {
 	// undo
 
 	const char32 *name;
-	if (! (name = CommandHistory_commandName (my history, 0))) {
+	if (! (name = CommandHistory_commandName (my history.peek(), 0))) {
 		name = U"nothing"; undoSense = false;
 	}
 
@@ -437,7 +437,7 @@ static void update_dos (I) {
 
 	// redo
 
-	if (! (name = CommandHistory_commandName (my history, 1))) {
+	if (! (name = CommandHistory_commandName (my history.peek(), 1))) {
 		name = U"nothing"; redoSense = false;
 	}
 	GuiButton_setText (my redo, Melder_cat (U"Redo ", U"\"", name, U"\""));
@@ -593,7 +593,7 @@ static void gui_button_cb_remove (I, GuiButtonEvent /* event */) {
 			return;
 		}
 		if (my history) {
-			CommandHistory_insertItem (my history, command.transfer());
+			CommandHistory_insertItem (my history.peek(), command.transfer());
 		}
 		updateWidgets (me);
 	}
@@ -607,7 +607,7 @@ static void insert (I, int position) {
 		autoCategoriesEditorInsert command = CategoriesEditorInsert_create (me, str.transfer(), position);
 		Command_do (command.peek());
 		if (my history) {
-			CommandHistory_insertItem (my history, command.transfer());
+			CommandHistory_insertItem (my history.peek(), command.transfer());
 		}
 		updateWidgets (me);
 	}
@@ -637,7 +637,7 @@ static void gui_button_cb_replace (I, GuiButtonEvent /* event */) {
 			                                      posList.peek(), posCount);
 			Command_do (command.peek());
 			if (my history) {
-				CommandHistory_insertItem (my history, command.transfer());
+				CommandHistory_insertItem (my history.peek(), command.transfer());
 			}
 			updateWidgets (me);
 		}
@@ -654,7 +654,7 @@ static void gui_button_cb_moveUp (I, GuiButtonEvent /* event */) {
 		                                     (me, posList.peek(), posCount, posList[1] - 1);
 		Command_do (command.peek());
 		if (my history) {
-			CommandHistory_insertItem (my history, command.transfer());
+			CommandHistory_insertItem (my history.peek(), command.transfer());
 		}
 		updateWidgets (me);
 	}
@@ -670,7 +670,7 @@ static void gui_button_cb_moveDown (I, GuiButtonEvent /* event */) {
 		                                       (me, posList.peek(), posCount, posList[posCount] + 1);
 		Command_do (command.peek());
 		if (my history) {
-			CommandHistory_insertItem (my history, command.transfer());
+			CommandHistory_insertItem (my history.peek(), command.transfer());
 		}
 		updateWidgets (me);
 	}
@@ -695,26 +695,25 @@ static void gui_list_cb_extended (void *void_me, GuiListEvent /* event */) {
 
 static void gui_button_cb_undo (I, GuiButtonEvent /* event */) {
 	iam (CategoriesEditor);
-	if (CommandHistory_offleft (my history)) {
+	if (CommandHistory_offleft (my history.peek())) {
 		return;
 	}
-	Command_undo (CommandHistory_getItem (my history));
-	CommandHistory_back (my history);
+	Command_undo (CommandHistory_getItem (my history.peek()));
+	CommandHistory_back (my history.peek());
 	updateWidgets (me);
 }
 
 static void gui_button_cb_redo (I, GuiButtonEvent /* event */) {
 	iam (CategoriesEditor);
-	CommandHistory_forth (my history);
-	if (CommandHistory_offright (my history)) {
+	CommandHistory_forth (my history.peek());
+	if (CommandHistory_offright (my history.peek())) {
 		return;
 	}
-	Command_do (CommandHistory_getItem (my history));
+	Command_do (CommandHistory_getItem (my history.peek()));
 	updateWidgets (me);
 }
 
 void structCategoriesEditor :: v_destroy () {
-	forget (history); /* !! Editor */
 	CategoriesEditor_Parent :: v_destroy ();
 }
 
@@ -773,14 +772,14 @@ void structCategoriesEditor :: v_dataChanged () {
 	updateWidgets (this);
 }
 
-CategoriesEditor CategoriesEditor_create (const char32 *title, Categories data) {
+autoCategoriesEditor CategoriesEditor_create (const char32 *title, Categories data) {
 	try {
 		autoCategoriesEditor me = Thing_new (CategoriesEditor);
 		Editor_init (me.peek(), 20, 40, 600, 600, title, data);
 		my history = CommandHistory_create (100);
 		update (me.peek(), 0, 0, 0, 0);
 		updateWidgets (me.peek());
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Categories window not created.");
 	}
diff --git a/dwtools/CategoriesEditor.h b/dwtools/CategoriesEditor.h
index 2c54c31..d87e395 100644
--- a/dwtools/CategoriesEditor.h
+++ b/dwtools/CategoriesEditor.h
@@ -2,7 +2,7 @@
 #define _CategoriesEditor_h_
 /* CategoriesEditor.h
  *
- * Copyright (C) 1993-2011 David Weenink
+ * Copyright (C) 1993-2011, 2015 David Weenink
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
 Thing_define (CategoriesEditor, Editor) {
 	// new data:
 	public:
-		CommandHistory history;
+		autoCommandHistory history;
 		int position;
 		GuiList list;
 		GuiText text;
@@ -40,6 +40,6 @@ Thing_define (CategoriesEditor, Editor) {
 		void v_dataChanged ();
 };
 
-CategoriesEditor CategoriesEditor_create (const char32 *title, Categories data);
+autoCategoriesEditor CategoriesEditor_create (const char32 *title, Categories data);
 
 #endif /* _CategoriesEditor_h_ */
\ No newline at end of file
diff --git a/dwtools/EEG_extensions.cpp b/dwtools/EEG_extensions.cpp
index 053e95e..a19544d 100644
--- a/dwtools/EEG_extensions.cpp
+++ b/dwtools/EEG_extensions.cpp
@@ -1,6 +1,6 @@
 /* EEG_extensions.cpp
  *
- * Copyright (C) 2012-2014 David Weenink
+ * Copyright (C) 2012-2014 David Weenink, 2015 Paul Boersma
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -26,17 +26,17 @@
 #include "Spectrum_extensions.h"
 #include "Sound_and_Spectrum.h"
 
-static EEG EEG_copyWithoutSound (EEG me) {
+static autoEEG EEG_copyWithoutSound (EEG me) {
 	try {
  		autoEEG thee = EEG_create (my xmin, my xmax);
 		thy numberOfChannels = my numberOfChannels;
-		thy textgrid = (TextGrid) Data_copy (my textgrid);
+		thy textgrid = Data_copy (my textgrid.get());
 		autostring32vector channelNames (1, my numberOfChannels);
 		for (long i = 1; i <= my numberOfChannels; i++) {
 			channelNames[i] = Melder_dup (my channelNames[i]);
 		}
 		thy channelNames = channelNames.transfer();
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not copied.");
 	}
@@ -98,7 +98,7 @@ CrossCorrelationTable EEG_to_CrossCorrelationTable (EEG me, double startTime, do
 		autoEEG thee = EEG_extractPart (me, startTime, endTime, true);
 		long numberOfChannels;
 		autoNUMvector <long> channels (NUMstring_getElementsOfRanges (channelRanges, thy numberOfChannels, & numberOfChannels, nullptr, U"channel", true), 1);
-		autoSound soundPart = Sound_copyChannelRanges (thy sound, channelRanges);
+		autoSound soundPart = Sound_copyChannelRanges (thy sound.get(), channelRanges);
 		autoCrossCorrelationTable him = Sound_to_CrossCorrelationTable (soundPart.peek(), startTime, endTime, lagStep);
 		// assign channel names
 		for (long i = 1; i <= numberOfChannels; i++) {
@@ -142,7 +142,7 @@ CrossCorrelationTables EEG_to_CrossCorrelationTables (EEG me, double startTime,
 		autoEEG thee = EEG_extractPart (me, startTime, endTime, true);
 		long numberOfChannels;
 		autoNUMvector <long> channels (NUMstring_getElementsOfRanges (channelRanges, thy numberOfChannels, & numberOfChannels, nullptr, U"channel", true), 1);
-		autoSound soundPart = Sound_copyChannelRanges (thy sound, channelRanges);
+		autoSound soundPart = Sound_copyChannelRanges (thy sound.get(), channelRanges);
 		autoCrossCorrelationTables him = Sound_to_CrossCorrelationTables (soundPart.peek(), startTime, endTime, lagStep, ncovars);
 		return him.transfer();
 	} catch (MelderError) {
@@ -176,7 +176,7 @@ EEG EEG_and_PCA_to_EEG_whiten (EEG me, PCA thee, long numberOfComponents) {
 		autoNUMvector<long> channelNumbers (EEG_channelNames_to_channelNumbers (me, thy labels, thy dimension), 1);
 
 		autoEEG him = (EEG) Data_copy (me);
-		autoSound white = Sound_and_PCA_whitenSelectedChannels (my sound, thee, numberOfComponents, channelNumbers.peek(), thy dimension);
+		autoSound white = Sound_and_PCA_whitenSelectedChannels (my sound.get(), thee, numberOfComponents, channelNumbers.peek(), thy dimension);
 		for (long i = 1; i <= thy dimension; i++) {
 			long ichannel = channelNumbers[i];
 			NUMvector_copyElements<double> (white -> z[i], his sound -> z[ichannel], 1, his sound -> nx);
@@ -197,7 +197,7 @@ EEG EEG_and_PCA_to_EEG_principalComponents (EEG me, PCA thee, long numberOfCompo
 
 		autoNUMvector<long> channelNumbers (EEG_channelNames_to_channelNumbers (me, thy labels, thy dimension), 1);
 		autoEEG him = (EEG) Data_copy (me);
-		autoSound pc = Sound_and_PCA_to_Sound_pc_selectedChannels (my sound, thee, numberOfComponents, channelNumbers.peek(), thy dimension);
+		autoSound pc = Sound_and_PCA_to_Sound_pc_selectedChannels (my sound.get(), thee, numberOfComponents, channelNumbers.peek(), thy dimension);
 		for (long i = 1; i <= thy dimension; i++) {
 			long ichannel = channelNumbers[i];
 			NUMvector_copyElements<double> (pc -> z[i], his sound -> z[ichannel], 1, his sound -> nx);
@@ -231,10 +231,10 @@ EEG EEG_to_EEG_bss (EEG me, double startTime, double endTime, long ncovars, doub
 			autoEEG white = EEG_and_PCA_to_EEG_whiten (thee.peek(), pca.peek(), 0);
 			thee.reset (white.transfer());
 		}
-		autoMixingMatrix mm = Sound_to_MixingMatrix (thy sound, startTime, endTime, ncovars, lagStep, maxNumberOfIterations, tol, diagonalizerMethod);
+		autoMixingMatrix mm = Sound_to_MixingMatrix (thy sound.get(), startTime, endTime, ncovars, lagStep, maxNumberOfIterations, tol, diagonalizerMethod);
 
 		autoEEG him = EEG_copyWithoutSound (me);
-		his sound = Sound_and_MixingMatrix_unmix (my sound, mm.peek());
+		his sound = Sound_and_MixingMatrix_unmix (my sound.get(), mm.peek());
 		EEG_setChannelNames_selected (him.peek(), U"ic", channelNumbers.peek(), numberOfChannels);
 
 		// Calculate the cross-correlations between eye-channels and the ic's
@@ -258,10 +258,10 @@ Sound EEG_to_Sound_modulated (EEG me, double baseFrequency, double channelBandwi
 		for (long i = 1; i <= numberOfChannels; i++) {
 			long ichannel = channelNumbers[i];
 			double fbase = baseFrequency;// + (ichannel - 1) * channelBandwidth;
-			autoSound si = Sound_extractChannel (my sound, ichannel);
+			autoSound si = Sound_extractChannel (my sound.get(), ichannel);
 			autoSpectrum spi = Sound_to_Spectrum (si.peek(), 1);
 			Spectrum_passHannBand (spi.peek(), 0.5, channelBandwidth - 0.5, 0.5);
-			autoSpectrum spi_shifted = Spectrum_shiftFrequencies (spi.peek(), fbase, samplingFrequency / 2, 30);
+			autoSpectrum spi_shifted = Spectrum_shiftFrequencies (spi.peek(), fbase, samplingFrequency / 2.0, 30);
 			autoSound resampled = Spectrum_to_Sound (spi_shifted.peek());
 			long nx = resampled -> nx < thy nx ? resampled -> nx : thy nx;
 			for (long j = 1; j <= nx; j++) {
@@ -277,9 +277,9 @@ Sound EEG_to_Sound_modulated (EEG me, double baseFrequency, double channelBandwi
 
 Sound EEG_to_Sound_frequencyShifted (EEG me, long channel, double frequencyShift, double samplingFrequency, double maxAmp) {
 	try {
-		autoSound si = Sound_extractChannel (my sound, channel);
+		autoSound si = Sound_extractChannel (my sound.get(), channel);
 		autoSpectrum spi = Sound_to_Spectrum (si.peek(), 1);
-		autoSpectrum spi_shifted = Spectrum_shiftFrequencies (spi.peek(), frequencyShift, samplingFrequency / 2, 30);
+		autoSpectrum spi_shifted = Spectrum_shiftFrequencies (spi.peek(), frequencyShift, samplingFrequency / 2.0, 30);
 		autoSound thee = Spectrum_to_Sound (spi_shifted.peek());
 		if (maxAmp > 0) {
 			Vector_scale (thee.peek(), maxAmp);
diff --git a/dwtools/KlattGrid.cpp b/dwtools/KlattGrid.cpp
index ed780b6..46d2823 100644
--- a/dwtools/KlattGrid.cpp
+++ b/dwtools/KlattGrid.cpp
@@ -599,16 +599,16 @@ autoPhonationGrid PhonationGrid_create (double tmin, double tmax) {
 		autoPhonationGrid me = Thing_new (PhonationGrid);
 		Function_init (me.peek(), tmin, tmax);
 		my pitch = PitchTier_create (tmin, tmax);
-		my voicingAmplitude = IntensityTier_create (tmin, tmax).transfer();
+		my voicingAmplitude = IntensityTier_create (tmin, tmax);
 		my openPhase = RealTier_create (tmin, tmax);
 		my collisionPhase = RealTier_create (tmin, tmax);
 		my power1 = RealTier_create (tmin, tmax);
 		my power2 = RealTier_create (tmin, tmax);
 		my flutter = RealTier_create (tmin, tmax);
 		my doublePulsing = RealTier_create (tmin, tmax);
-		my spectralTilt = IntensityTier_create (tmin, tmax).transfer();
-		my aspirationAmplitude = IntensityTier_create (tmin, tmax).transfer();
-		my breathinessAmplitude = IntensityTier_create (tmin, tmax).transfer();
+		my spectralTilt = IntensityTier_create (tmin, tmax);
+		my aspirationAmplitude = IntensityTier_create (tmin, tmax);
+		my breathinessAmplitude = IntensityTier_create (tmin, tmax);
 		my options = PhonationGridPlayOptions_create ();
 		PhonationGrid_setNames (me.peek());
 		return me.transfer();
@@ -1234,9 +1234,9 @@ autoVocalTractGrid VocalTractGrid_create (double tmin, double tmax, long numberO
 	try {
 		autoVocalTractGrid me = Thing_new (VocalTractGrid);
 		Function_init (me.peek(), tmin, tmax);
-		my oral_formants = FormantGrid_createEmpty (tmin, tmax, numberOfFormants).transfer();
-		my nasal_formants = FormantGrid_createEmpty (tmin, tmax, numberOfNasalFormants).transfer();
-		my nasal_antiformants = FormantGrid_createEmpty (tmin, tmax, numberOfNasalAntiFormants).transfer();
+		my oral_formants = FormantGrid_createEmpty (tmin, tmax, numberOfFormants);
+		my nasal_formants = FormantGrid_createEmpty (tmin, tmax, numberOfNasalFormants);
+		my nasal_antiformants = FormantGrid_createEmpty (tmin, tmax, numberOfNasalAntiFormants);
 		my oral_formants_amplitudes = formantsAmplitudes_create (tmin, tmax, numberOfFormants);
 		my nasal_formants_amplitudes = formantsAmplitudes_create (tmin, tmax, numberOfNasalFormants);
 		my options = VocalTractGridPlayOptions_create ();
@@ -1711,10 +1711,10 @@ autoCouplingGrid CouplingGrid_create (double tmin, double tmax, long numberOfTra
 	try {
 		autoCouplingGrid me = Thing_new (CouplingGrid);
 		Function_init (me.peek(), tmin, tmax);
-		my tracheal_formants = FormantGrid_createEmpty (tmin, tmax, numberOfTrachealFormants).transfer();
-		my tracheal_antiformants = FormantGrid_createEmpty (tmin, tmax, numberOfTrachealAntiFormants).transfer();
+		my tracheal_formants = FormantGrid_createEmpty (tmin, tmax, numberOfTrachealFormants);
+		my tracheal_antiformants = FormantGrid_createEmpty (tmin, tmax, numberOfTrachealAntiFormants);
 		my tracheal_formants_amplitudes = formantsAmplitudes_create (tmin, tmax, numberOfTrachealFormants);
-		my delta_formants = FormantGrid_createEmpty (tmin, tmax, numberOfDeltaFormants).transfer();
+		my delta_formants = FormantGrid_createEmpty (tmin, tmax, numberOfDeltaFormants);
 		my glottis = PhonationTier_create (tmin, tmax);
 		my options = CouplingGridPlayOptions_create ();
 		CouplingGrid_setNames (me.peek());
@@ -1919,7 +1919,7 @@ autoFricationGrid FricationGrid_create (double tmin, double tmax, long numberOfF
 		autoFricationGrid me = Thing_new (FricationGrid);
 		Function_init (me.peek(), tmin, tmax);
 		my fricationAmplitude = IntensityTier_create (tmin, tmax);
-		my frication_formants = FormantGrid_createEmpty (tmin, tmax, numberOfFormants).transfer();
+		my frication_formants = FormantGrid_createEmpty (tmin, tmax, numberOfFormants);
 		my bypass = IntensityTier_create (tmin, tmax);
 		my frication_formants_amplitudes = formantsAmplitudes_create (tmin, tmax, numberOfFormants);
 		my options = FricationGridPlayOptions_create ();
diff --git a/dwtools/KlattGridEditors.cpp b/dwtools/KlattGridEditors.cpp
index caac674..6ba07e3 100644
--- a/dwtools/KlattGridEditors.cpp
+++ b/dwtools/KlattGridEditors.cpp
@@ -314,10 +314,10 @@ autoKlattGrid_FormantGridEditor KlattGrid_FormantGridEditor_create (const char32
 	try {
 		Melder_assert (data);
 		autoFormantGrid* fg = KlattGrid_getAddressOfFormantGrid (data, formantType);
-		if (fg) {
+		if (! fg) {
 			Melder_throw (U"Formant type unknown.");
 		}
-		if (FormantGrid_isEmpty (fg->get())) {
+		if (FormantGrid_isEmpty (fg -> get())) {
 			Melder_throw (U"Cannot edit an empty formant grid.");
 		}
 		autoKlattGrid_FormantGridEditor me = Thing_new (KlattGrid_FormantGridEditor);
diff --git a/dwtools/KlattTable.cpp b/dwtools/KlattTable.cpp
index 8791c90..4bc9cf4 100644
--- a/dwtools/KlattTable.cpp
+++ b/dwtools/KlattTable.cpp
@@ -482,6 +482,18 @@ autoKlattTable KlattTable_readFromRawTextFile (MelderFile fs) {
 }
 
 static void KlattGlobal_free (KlattGlobal me) {
+	for (long i = 1; i <= 8; i++) {
+		my rc[i].reset(nullptr);
+		if (i <= 6) {
+			my rp[i].reset(nullptr);
+		}
+	}
+	my rnpp.reset(nullptr);
+	my rnpc.reset(nullptr);
+	my rnz.reset(nullptr);
+	my rgl.reset(nullptr);
+	my rlp.reset(nullptr);
+	my rout.reset(nullptr);
 	Melder_free (me);
 }
 
@@ -549,7 +561,7 @@ static void KlattFrame_free (KlattFrame me) {
 
 autoKlattTable KlattTable_create (double frameDuration, double totalDuration) {
 	try {
-		autoKlattTable me = (KlattTable) Thing_new (KlattTable);
+		autoKlattTable me = Thing_new (KlattTable);
 		long nrows = (long) floor (totalDuration / frameDuration) + 1;
 		Table_initWithColumnNames (me.peek(), nrows, columnNames);
 		return me;
@@ -2564,7 +2576,7 @@ autoKlattTable KlattTable_createExample () {
 		{{ 830, 0, 920, 0, 1445, 0, 2804, 0, 3915, 0, 5969, 0, 6256, 0, 0, 0, 200, 30, 0, 60, 0, 0, 0, 0, 0, 87, 0, 62, 0, 103, 0, 105, 0, 80, 0, 80, 0, 0, 0, 60 }}
 	};
 	try {
-		autoKlattTable me = (KlattTable) Thing_new (KlattTable);
+		autoKlattTable me = Thing_new (KlattTable);
 		Table_initWithColumnNames (me.peek(), nrows, columnNames);
 		for (long irow = 1; irow <= nrows; irow++) {
 			for (long jcol = 1; jcol <= KlattTable_NPAR; jcol++) {
diff --git a/dwtools/SpeechSynthesizer.cpp b/dwtools/SpeechSynthesizer.cpp
index fef3c8a..04d38cf 100644
--- a/dwtools/SpeechSynthesizer.cpp
+++ b/dwtools/SpeechSynthesizer.cpp
@@ -509,7 +509,7 @@ autoSound SpeechSynthesizer_to_Sound (SpeechSynthesizer me, const char32 *text,
 
 		espeak_SetSynthCallback (synthCallback);
 
-		my d_events = Table_createWithColumnNames (0, U"time type type-t t-pos length a-pos sample id uniq");
+		my d_events = Table_createWithColumnNames (0, U"time type type-t t-pos length a-pos sample id uniq").transfer();
 		
 		#ifdef _WIN32
                 wchar_t *textW = Melder_peek32toW (text);
diff --git a/dwtools/Strings_extensions.cpp b/dwtools/Strings_extensions.cpp
index b7867b2..37d6d3c 100644
--- a/dwtools/Strings_extensions.cpp
+++ b/dwtools/Strings_extensions.cpp
@@ -203,7 +203,7 @@ autoStringsIndex Stringses_to_StringsIndex (Strings me, Strings classes) {
 		for (long i = 1; i <= numberOfClasses; i++) {
 			SimpleString t = (SimpleString) tmp -> classes -> item[i];
 			autoSimpleString t2 = Data_copy (t);
-			Collection_addItem (his classes, t2.transfer());
+			Collection_addItem (his classes.peek(), t2.transfer());
 		}
 		for (long j = 1; j <= my numberOfStrings; j++) {
 			long index = 0;
@@ -235,7 +235,7 @@ autoStringsIndex Strings_to_StringsIndex (Strings me) {
 			if (i == 1 || Melder_cmp (strings, stringsi) != 0) {
 				numberOfClasses++;
 				autoSimpleString him = SimpleString_create (stringsi);
-				Collection_addItem (thy classes, him.transfer());
+				Collection_addItem (thy classes.peek(), him.transfer());
 				strings = stringsi;
 			}
 			thy classIndex[index] = numberOfClasses;
diff --git a/dwtools/TableOfReal_extensions.cpp b/dwtools/TableOfReal_extensions.cpp
index 7fa4e64..0d0688d 100644
--- a/dwtools/TableOfReal_extensions.cpp
+++ b/dwtools/TableOfReal_extensions.cpp
@@ -1424,7 +1424,7 @@ TableOfReal TableOfReal_meansByRowLabels (TableOfReal me, int expand, int stats)
 		} else {
 			indexr++;
 			TableOfReal_copyOneRowWithLabel (sorted.peek(), sorted.peek(), indexi, indexr);
-			thee.reset (TableOfReal_create (indexr, my numberOfColumns));
+			thee = TableOfReal_create (indexr, my numberOfColumns);
 			for (long i = 1; i <= indexr; i++) {
 				TableOfReal_copyOneRowWithLabel (sorted.peek(), thee.peek(), i, i);
 			}
diff --git a/dwtools/VowelEditor.cpp b/dwtools/VowelEditor.cpp
index e1c2d52..1c80957 100644
--- a/dwtools/VowelEditor.cpp
+++ b/dwtools/VowelEditor.cpp
@@ -124,7 +124,6 @@ static void PitchTier_newDuration (PitchTier me, structVowelEditor_F0 *f0p, doub
 static void FormantTier_newDuration (FormantTier me, double newDuration);
 static void FormantTier_drawF1F2Trajectory (FormantTier me, Graphics g, double f1min, double f1max, double f2min, double f2max, double markTraceEvery, double width);
 static autoFormantGrid FormantTier_to_FormantGrid (FormantTier me);
-static autoPitchTier VowelEditor_to_PitchTier (VowelEditor me, double duration);
 static void VowelEditor_updateF0Info (VowelEditor me);
 static void VowelEditor_updateExtendDuration (VowelEditor me);
 static double VowelEditor_updateDurationInfo (VowelEditor me);
@@ -260,7 +259,7 @@ static autoFormantGrid FormantTier_to_FormantGrid (FormantTier me) {
 		}
 		return thee;
 	} catch (MelderError) {
-		Melder_throw (me, U": no FormantGrod created.");
+		Melder_throw (me, U": no FormantGrid created.");
 	}
 }
 
@@ -679,14 +678,14 @@ static void VowelEditor_setMarks (VowelEditor me, int marksDataset, int speakerT
 	const char32 *Sex[3] = { U"", U"m", U"f"};
 	if (marksDataset == 1) { // American-English
 		autoTable thee = Table_createFromPetersonBarneyData ();
-		te.reset (Table_extractRowsWhereColumn_string (thee.peek(), 1, kMelder_string_EQUAL_TO, Type[speakerType]));
+		te = Table_extractRowsWhereColumn_string (thee.peek(), 1, kMelder_string_EQUAL_TO, Type[speakerType]);
 	} else if (marksDataset == 2) { // Dutch
 		if (speakerType == 1 || speakerType == 2) { // male + female from Pols van Nierop
 			autoTable thee = Table_createFromPolsVanNieropData ();
-			te.reset (Table_extractRowsWhereColumn_string (thee.peek(), 1, kMelder_string_EQUAL_TO, Sex[speakerType]));
+			te = Table_extractRowsWhereColumn_string (thee.peek(), 1, kMelder_string_EQUAL_TO, Sex[speakerType]);
 		} else {
 			autoTable thee = Table_createFromWeeninkData ();
-			te.reset (Table_extractRowsWhereColumn_string (thee.peek(), 1, kMelder_string_EQUAL_TO, Type[speakerType]));
+			te = Table_extractRowsWhereColumn_string (thee.peek(), 1, kMelder_string_EQUAL_TO, Type[speakerType]);
 		}
 	} else if (marksDataset == 3) { // None
 		my marks.reset();
diff --git a/dwtools/praat_David_init.cpp b/dwtools/praat_David_init.cpp
index 1ad6686..cd120f3 100644
--- a/dwtools/praat_David_init.cpp
+++ b/dwtools/praat_David_init.cpp
@@ -332,8 +332,8 @@ DIRECT (Categories_edit)
 	} else {
 		LOOP {
 			iam (Categories);
-			praat_installEditor (CategoriesEditor_create (
-				my name, me), IOBJECT);
+			autoCategoriesEditor thee = CategoriesEditor_create (my name, me);
+			praat_installEditor (thee.transfer(), IOBJECT);
 		}
 	}
 END
@@ -419,14 +419,14 @@ DIRECT (Categories_join)
 	}
 	Melder_assert (c1 && c2);
 	autoOrderedOfString thee = OrderedOfString_joinItems (c1, c2);
-	praat_new (thee.move());
+	praat_new (thee.transfer(), c1 -> name, U"_", c2 -> name);
 END
 
 DIRECT (Categories_permuteItems)
 	LOOP {
 		iam (Collection);
-		autoCollection thee = Collection_permuteItems (me);   // thee will be of class Categories!
-		praat_new (thee.move(), my name, U"_perm");
+		autoCollection thee = Collection_permuteItems (me);
+		praat_new (thee.transfer(), my name, U"_perm");
 	}
 END
 
@@ -2849,8 +2849,8 @@ DIRECT (FilesInMemory_addItems)
 	LOOP {
 		iam (Daata);
 		if (CLASS == classFileInMemory) {
-			FileInMemory t1 = (FileInMemory) Data_copy (me);
-			Collection_addItem (thee, t1);
+			autoFileInMemory t1 = (FileInMemory) Data_copy (me);
+			Collection_addItem (thee, t1.transfer());
 		}
 	}
 END
@@ -4785,12 +4785,12 @@ FORM (Permutation_create, U"Create Permutation", U"Create Permutation...")
 	BOOLEAN (U"Identity Permutation", 1)
 	OK
 DO
-	Permutation p = Permutation_create (GET_INTEGER (U"Number of elements"));
+	autoPermutation p = Permutation_create (GET_INTEGER (U"Number of elements"));
 	int identity = GET_INTEGER (U"Identity Permutation");
 	if (! identity) {
-		Permutation_permuteRandomly_inline (p, 0, 0);
+		Permutation_permuteRandomly_inline (p.peek(), 0, 0);
 	}
-	praat_new (p, GET_STRING (U"Name"));
+	praat_new (p.transfer(), GET_STRING (U"Name"));
 END
 
 DIRECT (Permutation_getNumberOfElements)
diff --git a/external/espeak/espeakdata_FileInMemory.cpp b/external/espeak/espeakdata_FileInMemory.cpp
index 59e0119..3953ba6 100644
--- a/external/espeak/espeakdata_FileInMemory.cpp
+++ b/external/espeak/espeakdata_FileInMemory.cpp
@@ -1,6 +1,6 @@
 /* espeakdata_FileInMemory.c
  *
- * Copyright (C) David Weenink 2012
+ * Copyright (C) David Weenink 2012, 2015
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/external/espeak/espeakdata_FileInMemory.h b/external/espeak/espeakdata_FileInMemory.h
index 9fcb953..5114859 100644
--- a/external/espeak/espeakdata_FileInMemory.h
+++ b/external/espeak/espeakdata_FileInMemory.h
@@ -23,23 +23,38 @@
 #include "Table.h"
 
 extern FilesInMemory espeakdata_phons;
+
 extern FilesInMemory espeakdata_dicts;
+
 extern FilesInMemory espeakdata_voices;
+
 extern FilesInMemory espeakdata_variants;
+
 FilesInMemory create_espeakdata_phons ();
+
 FilesInMemory create_espeakdata_dicts ();
+
 FilesInMemory create_espeakdata_voices ();
+
 FilesInMemory create_espeakdata_variants ();
+
 extern Strings espeakdata_voices_names;
+
 extern Strings espeakdata_variants_names;
 
 void espeakdata_praat_init ();
+
 const char * espeakdata_get_voicedata (const char *data, long ndata, char *buf, long nbuf, long *index);
+
 Table espeakdata_voices_to_Table (FilesInMemory me);
+
 Strings espeakdata_voices_getNames (Table me, long column);
+
 // mask the char / char32
 char * espeakdata_get_dict_data (const char *name, unsigned int *size);
+
 const char * espeakdata_get_voice (const char *vname, long *numberOfBytes);
+
 const char * espeakdata_get_voiceVariant (const char *vname, long *numberOfBytes);
 
 #endif
diff --git a/fon/Cochleagram.h b/fon/Cochleagram.h
index 8164c1a..f14cd2d 100644
--- a/fon/Cochleagram.h
+++ b/fon/Cochleagram.h
@@ -32,7 +32,7 @@ Thing_define (Cochleagram, Matrix) {
 	nx;				// Number of time slices.
 	dx;				// Time step (seconds).
 	x1;				// Centre of first time sample (seconds).
-	ymin = 0;			// Minimum frequency (Bark).
+	ymin = 0.0;			// Minimum frequency (Bark).
 	ymax = 25.6;		// Maximum frequency (Bark).
 	ny;				// Number of frequencies.
 	dy = 25.6 / ny;		// Frequency step (Bark).
diff --git a/fon/FormantGrid.h b/fon/FormantGrid.h
index 3abe330..21092c5 100644
--- a/fon/FormantGrid.h
+++ b/fon/FormantGrid.h
@@ -35,13 +35,13 @@ autoFormantGrid FormantGrid_create (double tmin, double tmax, long numberOfForma
 	double initialFirstFormant, double initialFormantSpacing,
 	double initialFirstBandwidth, double initialBandwidthSpacing);
 
-double FormantGrid_getFormantAtTime (FormantGrid me, long iformant, double t);
-double FormantGrid_getBandwidthAtTime (FormantGrid me, long iformant, double t);
+double FormantGrid_getFormantAtTime (FormantGrid me, long formantNumber, double time);
+double FormantGrid_getBandwidthAtTime (FormantGrid me, long formantNumber, double time);
 
-void FormantGrid_addFormantPoint (FormantGrid me, long iformant, double t, double value);
-void FormantGrid_addBandwidthPoint (FormantGrid me, long iformant, double t, double value);
-void FormantGrid_removeFormantPointsBetween (FormantGrid me, long iformant, double tmin, double tmax);
-void FormantGrid_removeBandwidthPointsBetween (FormantGrid me, long iformant, double tmin, double tmax);
+void FormantGrid_addFormantPoint (FormantGrid me, long formantNumber, double time, double value);
+void FormantGrid_addBandwidthPoint (FormantGrid me, long formantNumber, double time, double value);
+void FormantGrid_removeFormantPointsBetween (FormantGrid me, long formantNumber, double tmin, double tmax);
+void FormantGrid_removeBandwidthPointsBetween (FormantGrid me, long formantNumber, double tmin, double tmax);
 
 void Sound_FormantGrid_filter_inline (Sound me, FormantGrid formantGrid);
 autoSound Sound_FormantGrid_filter (Sound me, FormantGrid formantGrid);
diff --git a/fon/Harmonicity.h b/fon/Harmonicity.h
index 9f8d522..8e04100 100644
--- a/fon/Harmonicity.h
+++ b/fon/Harmonicity.h
@@ -34,7 +34,8 @@ Thing_define (Harmonicity, Vector) {
 		nx >= 1			// Number of time slices.
 		dx > 0.0			// Time step (seconds).
 		x1				// Centre of first time slice (seconds).
-		ymin, ymax, ny, dy, y1 = 1
+		ymin, ymax, dy, y1 = 1.0
+		ny = 1
 		z [1] [1..nt]
 			// The harmonic strength, a real number between -150 dB and +150 dB:
 			// -150 dB means not periodic at all, +150 dB means perfectly periodic.
diff --git a/fon/Ltas.h b/fon/Ltas.h
index 74037af..74deaa7 100644
--- a/fon/Ltas.h
+++ b/fon/Ltas.h
@@ -42,7 +42,8 @@ Thing_define (Ltas, Vector) {
 		nx >= 1			// Number of bands.
 		dx > 0.0			// Band width (Hz).
 		x1				// Centre of first band (Hz).
-		ymin, ymax, ny, dy, y1 = 1
+		ymin, ymax, dy, y1 = 1.0
+		ny = 1
 		z [1] [1..nx]		// The intensity per band, in db/Hz.
 */
 
@@ -54,7 +55,7 @@ autoLtas Ltas_create (long nx, double dx);
 		nx >= 1;
 		dx > 0.0;
 	Postconditions:
-		my xmin == 0;              my ymin == 1;
+		my xmin == 0.0;              my ymin == 1;
 		my xmax == nx * dx;        my ymax == 1;
 		my nx == nx;               my ny == 1;
 		my dx == dx;               my dy == 1;
diff --git a/fon/Matrix.cpp b/fon/Matrix.cpp
index 44f8b7f..c5c35a6 100644
--- a/fon/Matrix.cpp
+++ b/fon/Matrix.cpp
@@ -546,9 +546,7 @@ autoMatrix Matrix_readFromRawTextFile (MelderFile file) {   // BUG: not Unicode-
 	}
 }
 
-void Matrix_eigen (Matrix me, Matrix *out_eigenvectors, Matrix *out_eigenvalues) {
-	*out_eigenvectors = nullptr;
-	*out_eigenvalues = nullptr;
+void Matrix_eigen (Matrix me, autoMatrix *out_eigenvectors, autoMatrix *out_eigenvalues) {
 	try {
 		if (my nx != my ny)
 			Melder_throw (U"(Matrix not square.");
@@ -556,14 +554,14 @@ void Matrix_eigen (Matrix me, Matrix *out_eigenvectors, Matrix *out_eigenvalues)
 		autoEigen eigen = Thing_new (Eigen);
 		Eigen_initFromSymmetricMatrix (eigen.peek(), my z, my nx);
 		autoMatrix eigenvectors = Data_copy (me);
-		autoMatrix eigenvalues = Matrix_create (1, 1, 1, 1, 1, my ymin, my ymax, my ny, my dy, my y1);
+		autoMatrix eigenvalues = Matrix_create (1.0, 1.0, 1, 1.0, 1.0, my ymin, my ymax, my ny, my dy, my y1);
 		for (long i = 1; i <= my nx; i ++) {
 			eigenvalues -> z [i] [1] = eigen -> eigenvalues [i];
 			for (long j = 1; j <= my nx; j ++)
 				eigenvectors -> z [i] [j] = eigen -> eigenvectors [j] [i];
 		}
-		*out_eigenvectors = eigenvectors.transfer();
-		*out_eigenvalues = eigenvalues.transfer();
+		*out_eigenvectors = eigenvectors.move();
+		*out_eigenvalues = eigenvalues.move();
 	} catch (MelderError) {
 		Melder_throw (me, U": eigenstructure not computed.");
 	}
diff --git a/fon/Matrix.h b/fon/Matrix.h
index 000774c..e4a86bd 100644
--- a/fon/Matrix.h
+++ b/fon/Matrix.h
@@ -39,9 +39,12 @@ autoMatrix Matrix_create
 	Function:
 		return a new empty Matrix.
 	Preconditions:
-		xmin <= xmax;   ymin <= ymax;
-		nx >= 1;  ny >= 1;
-		dx > 0.0;   dy > 0.0;
+		xmin <= xmax;
+		ymin <= ymax;
+		nx >= 1;
+		ny >= 1;
+		dx > 0.0;
+		dy > 0.0;
 	Postconditions:
 		result -> xmin == xmin;
 		result -> xmax == xmax;
@@ -61,7 +64,8 @@ autoMatrix Matrix_createSimple (long numberOfRows, long numberOfColumns);
 	Function:
 		return a new empty Matrix.
 	Preconditions:
-		numberOfRows >= 1;  numberOfColumns >= 1;
+		numberOfRows >= 1;
+		numberOfColumns >= 1;
 	Postconditions:
 		result -> xmin == 0.5;
 		result -> xmax == numberOfColumns + 0.5;
@@ -69,18 +73,18 @@ autoMatrix Matrix_createSimple (long numberOfRows, long numberOfColumns);
 		result -> ymax == numberOfRows + 0.5;
 		result -> nx == numberOfColumns;
 		result -> ny == numberOfRows;
-		result -> dx == 1;
-		result -> dy == 1;
-		result -> x1 == 1;
-		result -> y1 == 1;
+		result -> dx == 1.0;
+		result -> dy == 1.0;
+		result -> x1 == 1.0;
+		result -> y1 == 1.0;
 		result -> z [1..ny] [1..nx] == 0.0;
 */
 
-/* Implemented methods
+/* An implemented method
 
-	int Matrix::writeText (I, FILE *f);
-		writes a Matrix as text to the stream f.
-		A sample of the format follows (see example 3 above):
+	void structMatrix :: v_writeText (MelderFile file);
+		writes a Matrix as text to `file`.
+		A sample of the format follows:
 			0 5000 1 2   ! xmin xmax ymin ymax
 			8193 2   ! nx ny
 			0.61035156 1   ! dx dy
@@ -95,27 +99,6 @@ autoMatrix Matrix_createSimple (long numberOfRows, long numberOfColumns);
 			The data lines (all lines after the fourth) contain: my z [iy, ix], x, y.
 			things written after the "!" are mere comments:
 			you cannot use them to change the meaning or order of the data.
-
-	int Matrix::readText (I, FILE *f)
-		reads a Matrix as text from the stream f.
-		The requested format is the same as the format produced by
-		Matrix::writeText, though any comments may be left out.
-		Failures:
-			Wrong text input: this line should start with xmin, xmax, ymin, and ymax.
-			Wrong text input: this line should start with nx >= 1 and ny >= 1.
-			Wrong text input: this line should start with dx > 0.0 and dy > 0.0.
-			Wrong text input: this line should start with x1 and y1.
-			Out of text input: there should be 'nx * ny' lines with z values.
-
-	int Matrix::writeBinary (I, FILE *f)
-		writes a Matrix to the stream f, in IEEE floating-point format.
-
-	int Matrix::readBinary (I, FILE *f)
-		reads a Matrix from the stream f, in IEEE floating-point format.
-		Failures:
-			Wrong binary input.
-			Not enough memory to read this Matrix.
-			Out of input.
 */
 
 long Matrix_getWindowSamplesX (Matrix me, double xmin, double xmax, long *ixmin, long *ixmax);
@@ -141,25 +124,25 @@ double Matrix_getValueAtXY (Matrix me, double x, double y);
 double Matrix_getSum (Matrix me);
 double Matrix_getNorm (Matrix me);
 
-double Matrix_columnToX (Matrix me, double column);   /* Return my x1 + (column - 1) * my dx.	 */
+double Matrix_columnToX (Matrix me, double column);   // return my x1 + (column - 1) * my dx
 
-double Matrix_rowToY (Matrix me, double row);   /* Return my y1 + (row - 1) * my dy. */
+double Matrix_rowToY (Matrix me, double row);   // return my y1 + (row - 1) * my dy
 
-double Matrix_xToColumn (Matrix me, double x);   /* Return (x - xmin) / my dx + 1. */
+double Matrix_xToColumn (Matrix me, double x);   // return (x - xmin) / my dx + 1
 
-long Matrix_xToLowColumn (Matrix me, double x);   /* Return floor (Matrix_xToColumn (me, x)). */
+long Matrix_xToLowColumn (Matrix me, double x);   // return floor (Matrix_xToColumn (me, x))
 
-long Matrix_xToHighColumn (Matrix me, double x);   /* Return ceil (Matrix_xToColumn (me, x)). */
+long Matrix_xToHighColumn (Matrix me, double x);   // return ceil (Matrix_xToColumn (me, x))
 
-long Matrix_xToNearestColumn (Matrix me, double x);   /* Return floor (Matrix_xToColumn (me, x) + 0.5). */
+long Matrix_xToNearestColumn (Matrix me, double x);   // return floor (Matrix_xToColumn (me, x) + 0.5)
 
-double Matrix_yToRow (Matrix me, double y);   /* Return (y - ymin) / my dy + 1. */
+double Matrix_yToRow (Matrix me, double y);   // return (y - ymin) / my dy + 1
 
-long Matrix_yToLowRow (Matrix me, double y);   /* Return floor (Matrix_yToRow (me, y)). */
+long Matrix_yToLowRow (Matrix me, double y);   // return floor (Matrix_yToRow (me, y))
 
-long Matrix_yToHighRow (Matrix me, double x);   /* Return ceil (Matrix_yToRow (me, y)). */
+long Matrix_yToHighRow (Matrix me, double x);   // return ceil (Matrix_yToRow (me, y))
 
-long Matrix_yToNearestRow (Matrix me, double y);   /* Return floor (Matrix_yToRow (me, y) + 0.5). */
+long Matrix_yToNearestRow (Matrix me, double y);   // return floor (Matrix_yToRow (me, y) + 0.5)
 
 long Matrix_getWindowSamplesY (Matrix me, double ymin, double ymax, long *iymin, long *iymax);
 
@@ -252,7 +235,7 @@ autoMatrix Matrix_readFromRawTextFile (MelderFile file);
 autoMatrix Matrix_readAP (MelderFile file);
 autoMatrix Matrix_appendRows (Matrix me, Matrix thee, ClassInfo klas);
 
-void Matrix_eigen (Matrix me, Matrix *eigenvectors, Matrix *eigenvalues);
+void Matrix_eigen (Matrix me, autoMatrix *eigenvectors, autoMatrix *eigenvalues);
 autoMatrix Matrix_power (Matrix me, long power);
 
 void Matrix_scaleAbsoluteExtremum (Matrix me, double scale);
diff --git a/fon/Pitch_to_Sound.cpp b/fon/Pitch_to_Sound.cpp
index 58500bf..096fc29 100644
--- a/fon/Pitch_to_Sound.cpp
+++ b/fon/Pitch_to_Sound.cpp
@@ -31,12 +31,12 @@
 #include "PitchTier_to_Sound.h"
 #include "Pitch_to_PitchTier.h"
 
-autoSound Pitch_to_Sound (Pitch me, double tmin, double tmax, int hum) {
-	static double formant [1 + 6] = { 0, 600, 1400, 2400, 3400, 4500, 5500 };
-	static double bandwidth [1 + 6] = { 0, 50, 100, 200, 300, 400, 500 };
+autoSound Pitch_to_Sound (Pitch me, double tmin, double tmax, bool hum) {
+	static double formant [1 + 6] { 0.0, 600.0, 1400.0, 2400.0, 3400.0, 4500.0, 5500.0 };
+	static double bandwidth [1 + 6] { 0.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0 };
 	try {
 		autoPointProcess point = Pitch_to_PointProcess (me);
-		autoSound sound = PointProcess_to_Sound_pulseTrain (point.peek(), 44100, 0.7, 0.05, 30);
+		autoSound sound = PointProcess_to_Sound_pulseTrain (point.peek(), 44100.0, 0.7, 0.05, 30);
 		if (hum) {
 			Sound_filterWithFormants (sound.peek(), tmin, tmax, 6, formant, bandwidth);
 		}
@@ -66,7 +66,7 @@ void Pitch_hum (Pitch me, double tmin, double tmax) {
 	}
 }
 
-autoSound Pitch_to_Sound_sine (Pitch me, double tmin, double tmax, double samplingFrequency, int roundToNearestZeroCrossings) {
+autoSound Pitch_to_Sound_sine (Pitch me, double tmin, double tmax, double samplingFrequency, bool roundToNearestZeroCrossings) {
 	try {
 		autoPitchTier tier = Pitch_to_PitchTier (me);
 		autoSound sound = PitchTier_to_Sound_sine (tier.peek(), tmin, tmax, samplingFrequency);
diff --git a/fon/Pitch_to_Sound.h b/fon/Pitch_to_Sound.h
index 3517b15..ded8748 100644
--- a/fon/Pitch_to_Sound.h
+++ b/fon/Pitch_to_Sound.h
@@ -24,7 +24,7 @@
 /* then this PointProcess into a Sound (pulse train), */
 /* and then optionally filter this with 6 formants. */
 
-autoSound Pitch_to_Sound (Pitch me, double tmin, double tmax, int hum);
+autoSound Pitch_to_Sound (Pitch me, double tmin, double tmax, bool hum);
 void Pitch_play (Pitch me, double tmin, double tmax);
 void Pitch_hum (Pitch me, double tmin, double tmax);
 
@@ -33,6 +33,6 @@ void Pitch_hum (Pitch me, double tmin, double tmax);
 /* and then cuts away the unvoiced stretches. */
 
 autoSound Pitch_to_Sound_sine (Pitch me, double tmin, double tmax, double samplingFrequency,
-	int roundToNearestZeroCrossings);
+	bool roundToNearestZeroCrossings);
 
 /* End of file Pitch_to_Sound.h */
diff --git a/fon/Sound.cpp b/fon/Sound.cpp
index ac6e9d8..68fc885 100644
--- a/fon/Sound.cpp
+++ b/fon/Sound.cpp
@@ -873,7 +873,7 @@ double Sound_getNearestZeroCrossing (Sound me, double position, long channel) {
 		position - leftZero < rightZero - position ? leftZero : rightZero;
 }
 
-void Sound_setZero (Sound me, double tmin_in, double tmax_in, int roundTimesToNearestZeroCrossing) {
+void Sound_setZero (Sound me, double tmin_in, double tmax_in, bool roundTimesToNearestZeroCrossing) {
 	Function_unidirectionalAutowindow (me, & tmin_in, & tmax_in);
 	Function_intersectRangeWithDomain (me, & tmin_in, & tmax_in);
 	for (long channel = 1; channel <= my ny; channel ++) {
diff --git a/fon/Sound.h b/fon/Sound.h
index cea9915..a48098b 100644
--- a/fon/Sound.h
+++ b/fon/Sound.h
@@ -163,7 +163,7 @@ double Sound_getPowerInAir (Sound me);
 double Sound_getIntensity_dB (Sound me);
 
 double Sound_getNearestZeroCrossing (Sound me, double position, long ichannel);
-void Sound_setZero (Sound me, double tmin, double tmax, int roundTimesToNearestZeroCrossing);
+void Sound_setZero (Sound me, double tmin, double tmax, bool roundTimesToNearestZeroCrossing);
 
 autoSound Sound_createAsPureTone (long numberOfChannels, double startingTime, double endTime,
 	double sampleRate, double frequency, double amplitude, double fadeInDuration, double fadeOutDuration);
diff --git a/fon/SoundRecorder.cpp b/fon/SoundRecorder.cpp
index 40ea372..dcb9e96 100644
--- a/fon/SoundRecorder.cpp
+++ b/fon/SoundRecorder.cpp
@@ -256,6 +256,10 @@ void structSoundRecorder :: v_destroy () {
 	SoundRecorder_Parent :: v_destroy ();
 }
 
+void structSoundRecorder :: v_goAway () {
+	Editor_sendPleaseReset (this);
+}
+
 static void showMaximum (SoundRecorder me, int channel, double maximum) {
 	maximum /= 32768.0;
 	Graphics_setWindow (my graphics,
@@ -636,7 +640,7 @@ static void publish (SoundRecorder me) {
 static void gui_button_cb_cancel (I, GuiButtonEvent /* event */) {
 	iam (SoundRecorder);
 	stopRecording (me);
-	forget (me);
+	Editor_sendPleaseReset (me);
 }
 
 static void gui_button_cb_apply (I, GuiButtonEvent /* event */) {
@@ -649,7 +653,7 @@ static void gui_button_cb_ok (I, GuiButtonEvent /* event */) {
 	iam (SoundRecorder);
 	stopRecording (me);
 	publish (me);
-	forget (me);
+	Editor_sendPleaseReset (me);
 }
 
 static void initialize (SoundRecorder me) {
diff --git a/fon/SoundRecorder.h b/fon/SoundRecorder.h
index 3a2220b..c0e0c12 100644
--- a/fon/SoundRecorder.h
+++ b/fon/SoundRecorder.h
@@ -116,6 +116,8 @@ Thing_define (SoundRecorder, Editor) {
 
 	void v_destroy ()
 		override;
+	void v_goAway ()
+		override;
 	bool v_editable ()
 		override { return false; }
 	bool v_scriptable ()
diff --git a/fon/Spectrum.h b/fon/Spectrum.h
index 9398ce5..9511cbb 100644
--- a/fon/Spectrum.h
+++ b/fon/Spectrum.h
@@ -34,10 +34,10 @@ oo_CLASS_CREATE (Spectrum, Matrix);
 	nx              // number of frequencies
 	dx              // frequency step (Hz)
 	x1              // first frequency (Hz)
-	ymin = 1        // first row: real part
-	ymax = 2        // second row: imaginary part
+	ymin = 1.0      // first row: real part
+	ymax = 2.0      // second row: imaginary part
 	ny = 2          // two rows
-	dy = 1; y1 = 1  // y is row number
+	dy = y1 = 1.0   // y is row number
 */
 
 autoSpectrum Spectrum_create (double fmax, long nf);
@@ -58,9 +58,9 @@ autoSpectrum Spectrum_create (double fmax, long nf);
 		my z [1..ny] [1..nx] == 0.0;
 */
 		
-int Spectrum_getPowerDensityRange (Spectrum me, double *minimum, double *maximum);   /* Return 0 if all zeroes. */
-double Spectrum_getBandDensity (Spectrum me, double fmin, double fmax);   /* Pa2 / Hz2 */
-double Spectrum_getBandEnergy (Spectrum me, double fmin, double fmax);   /* Pa2 sec */
+int Spectrum_getPowerDensityRange (Spectrum me, double *minimum, double *maximum);   // return 0 if all zeroes
+double Spectrum_getBandDensity (Spectrum me, double fmin, double fmax);   // Pa2 / Hz2
+double Spectrum_getBandEnergy (Spectrum me, double fmin, double fmax);   // Pa2 sec
 double Spectrum_getBandDensityDifference (Spectrum me,
 	double lowBandMin, double lowBandMax, double highBandMin, double HighBandMax);
 double Spectrum_getBandEnergyDifference (Spectrum me,
diff --git a/fon/Transition.cpp b/fon/Transition.cpp
index 7645d3e..ca8508f 100644
--- a/fon/Transition.cpp
+++ b/fon/Transition.cpp
@@ -156,9 +156,7 @@ static void Transition_transpose (Transition me) {
 	}
 }
 
-void Transition_eigen (Transition me, Matrix *out_eigenvectors, Matrix *out_eigenvalues) {
-	*out_eigenvectors = NULL;
-	*out_eigenvalues = NULL;
+void Transition_eigen (Transition me, autoMatrix *out_eigenvectors, autoMatrix *out_eigenvalues) {
 	bool transposed = false;
 	try {
 		autoEigen eigen = Thing_new (Eigen);
@@ -173,8 +171,8 @@ void Transition_eigen (Transition me, Matrix *out_eigenvectors, Matrix *out_eige
 			for (long j = 1; j <= my numberOfStates; j ++)
 				eigenvectors -> z [i] [j] = eigen -> eigenvectors [j] [i];
 		}
-		*out_eigenvectors = eigenvectors.transfer();
-		*out_eigenvalues = eigenvalues.transfer();
+		*out_eigenvectors = eigenvectors.move();
+		*out_eigenvalues = eigenvalues.move();
 	} catch (MelderError) {
 		if (transposed)
 			Transition_transpose (me);
diff --git a/fon/Transition.h b/fon/Transition.h
index 6ab898a..c6c2989 100644
--- a/fon/Transition.h
+++ b/fon/Transition.h
@@ -31,7 +31,7 @@ autoTransition Transition_create (long numberOfStates);
 void Transition_formula (Transition me, const char32 *formula);
 void Transition_drawAsNumbers (Transition me, Graphics g, int iformat, int precision);
 
-void Transition_eigen (Transition me, Matrix *eigenvectors, Matrix *eigenvalues);
+void Transition_eigen (Transition me, autoMatrix *eigenvectors, autoMatrix *eigenvalues);
 autoTransition Transition_power (Transition me, long power);
 
 autoMatrix Transition_to_Matrix (Transition me);
diff --git a/fon/manual_programming.cpp b/fon/manual_programming.cpp
index 3356135..1e5540c 100644
--- a/fon/manual_programming.cpp
+++ b/fon/manual_programming.cpp
@@ -22,6 +22,371 @@
 void manual_programming_init (ManPages me);
 void manual_programming_init (ManPages me) {
 
+MAN_BEGIN (U"Interoperability", U"ppgb", 20151107)
+INTRO (U"You can use Praat in workflows that involve other programs.")
+ENTRY (U"1. General ways to access Praat from other programs")
+NORMAL (U"• To send messages from another program to a running Praat, use @@sendpraat at . "
+	"This method is used by the programs CHAT (Childes) and Phon to view a sound in a Sound window.")
+NORMAL (U"• To execute a Praat script as a subprocess of another program, see @@Scripting 6.9. Calling from the command line at .")
+ENTRY (U"2. General ways to access other programs from Praat")
+NORMAL (U"• To execute another program as a subprocess of Praat, see @@Scripting 6.5. Calling system commands at .")
+ENTRY (U"3. Files")
+NORMAL (U"• Many programs read and/or write Praat TextGrid files. If you want create a TextGrid reading or writing procedure, "
+	"consult @@TextGrid file formats at .")
+MAN_END
+
+MAN_BEGIN (U"TextGrid file formats", U"ppgb", 20151107)
+INTRO (U"This page describes the syntax and semantics of TextGrid files that Praat can read and/or write.")
+ENTRY (U"1. The full text format of a minimal TextGrid")
+NORMAL (U"If you record a Sound with a druation of 2.3 seconds, and then do ##To TextGrid...#, "
+	"you are asked to provide tier names and to say which of these tiers are point tiers. "
+	"If you click OK without changing the settings from their standard values, "
+	" you obtain a TextGrid with two interval tiers, called %Mary and %John, and one point tier called %bell. "
+	"When you save this TextGrid to disk by choosing @@Save as text file...@ from the #New menu, "
+	"the resulting text file, when opened in a text editor, will look as follows:")
+CODE (U"File type = \"ooTextFile\"")
+CODE (U"Object class = \"TextGrid\"")
+CODE (U"")
+CODE (U"xmin = 0")
+CODE (U"xmax = 2.3")
+CODE (U"tiers? <exists>")
+CODE (U"size = 3")
+CODE (U"item []:")
+	CODE1 (U"item [1]:")
+		CODE2 (U"class = \"IntervalTier\"")
+		CODE2 (U"name = \"Mary\"")
+		CODE2 (U"xmin = 0")
+		CODE2 (U"xmax = 2.3")
+		CODE2 (U"intervals: size = 1")
+		CODE2 (U"intervals [1]:")
+			CODE3 (U"xmin = 0")
+			CODE3 (U"xmax = 2.3")
+			CODE3 (U"text = \"\"")
+	CODE1 (U"item [2]:")
+		CODE2 (U"class = \"IntervalTier\"")
+		CODE2 (U"name = \"John\"")
+		CODE2 (U"xmin = 0")
+		CODE2 (U"xmax = 2.3")
+		CODE2 (U"intervals: size = 1")
+		CODE2 (U"intervals [1]:")
+			CODE3 (U"xmin = 0")
+			CODE3 (U"xmax = 2.3")
+			CODE3 (U"text = \"\"")
+	CODE1 (U"item [3]:")
+		CODE2 (U"class = \"TextTier\"")
+		CODE2 (U"name = \"bell\"")
+		CODE2 (U"xmin = 0")
+		CODE2 (U"xmax = 2.3")
+		CODE2 (U"points: size = 0")
+NORMAL (U"This text file contains the following pieces of data, which Praat will use when reading this file from disk "
+	"and turning it into a TextGrid object again:")
+NORMAL (U"• The text \"ooTextFile\", which appears in the first line of any text file that you write with @@Save as text file...@, "
+	"i.e. not only in text files created from a TextGrid object, but also in text files created from e.g. a Pitch "
+	"or ExperimentMFC object or from any other of the hundreds of types of objects that Praat can have in its Objects list.")
+NORMAL (U"• The text \"TextGrid\", which designates the type of the object that has been saved to this file.")
+NORMAL (U"• The real number 0, which is the starting time (in seconds) of this TextGrid.")
+NORMAL (U"• The real number 2.3, which is the end time (in seconds) of the TextGrid.")
+NORMAL (U"• The flag <exists>, which tells us that this TextGrid contains tiers (this value would be <absent> "
+	"if the TextGrid contained no tiers, in which case the file would end here; however, you cannot really create TextGrid objects "
+	"without tiers in Praat, so this issue can be ignored).")
+NORMAL (U"• The integer number 3, which is the number of tiers that you created.")
+NORMAL (U"• The text \"IntervalTier\", which designates the type of the first tier (an interval tier, therefore).")
+NORMAL (U"• The text \"Mary\", which is the name you gave to the first tier.")
+NORMAL (U"• The real number 0, which is the starting time (in seconds) of the first tier.")
+NORMAL (U"• The real number 2.3, which is the end time (in seconds) of the first tier. "
+	"When you create a TextGrid with an interval tier, the time domain of the interval tier is automatically set equal "
+	"to the time domain of the whole TextGrid.")
+NORMAL (U"• The integer number 1, which is the number of intervals in the first tier. "
+	"Although you did not add any intervals and did not add any text to the first tier, "
+	"all interval tiers always contain at least one interval, which is created when you create the TextGrid.")
+NORMAL (U"• The real number 0, which is the starting time (in seconds) of the first (only) interval of the first tier.")
+NORMAL (U"• The real number 2.3, which is the end time (in seconds) of the first interval of the first tier. "
+	"The interval that is automatically created for you when you create a TextGrid with an interval tier, "
+	"spans the whole tier.")
+NORMAL (U"• The text \"\", which is the contents of the interval on the first tier. This text is empty.")
+NORMAL (U"• The text \"IntervalTier\", which gives the type of the second tier (again an interval tier).")
+NORMAL (U"• The text \"John\", which is the name you gave to the second tier.")
+NORMAL (U"• The real number 0, which is the starting time (in seconds) of the second tier.")
+NORMAL (U"• The real number 2.3, which is the end time (in seconds) of the second tier.")
+NORMAL (U"• The integer number 1, which is the number of intervals in the second tier.")
+NORMAL (U"• The real number 0, which is the starting time (in seconds) of the first (only) interval of the second tier.")
+NORMAL (U"• The real number 2.3, which is the end time (in seconds) of the first interval of the second tier.")
+NORMAL (U"• The text \"\", which is the contents of the interval on the second tier. This text is empty.")
+NORMAL (U"• The text \"TextTier\", which designates the type of the third tier (a point tier this time).")
+NORMAL (U"• The text \"bell\", which is the name you gave to the third tier.")
+NORMAL (U"• The real number 0, which is the starting time (in seconds) of the third tier.")
+NORMAL (U"• The real number 2.3, which is the end time (in seconds) of the third tier.")
+NORMAL (U"• The integer number 0, which is the number of points in the third tier. "
+	"A newly created point tier contains no points yet.")
+NORMAL (U"You will have noticed that the file contains a lot of stuff that was not mentioned in this list. "
+	"All of that stuff are %comments that are present only to help the human reader understand the contents "
+	"of the file: labels for all tiers (such as $$item [2]$), labels for the starting times of the TextGrid or "
+	"a tier or an interval ($xmin), labels for end times ($xmax); labels for the number of tiers or "
+	"intervals or points ($size), and little numbers enclosed in square brackets to tell the reader where they are ($$[2]$).")
+NORMAL (U"When reading a text file containing a TextGrid (or any other object), Praat totally ignores these comments, "
+	"so if you e.g. replace $$[2]$ with $$[4]$ somewhere, Praat will not notice. Praat will consider as data only the following "
+	"types of information in the file:")
+LIST_ITEM (U"• free-standing numbers, such as $$0$ and $$2.3$ above, but not $$[1]$ or $$[3]$;")
+LIST_ITEM (U"• free-standing text enclosed within double quotes, such as $$\"TextGrid\"$ and $$\"\"$ above;")
+LIST_ITEM (U"• free-standing flags, such as $$<exists>$ above (this is the only flag that appears in TextGrid files; "
+	"see @ExperimentMFC for a much broader use of flags).")
+NORMAL (U"In this list, \"free-standing\" means that the number, text or flag is preceded by the beginning of the file, "
+	"the beginning of a line, or a space, and that it is followed by the end of the file, the end of a line, or a space.")
+ENTRY (U"2. The shortest text format of a minimal TextGrid")
+NORMAL (U"From the description above of what in the file is considered data (namely free-standing numbers, texts and flags) "
+	"and what is not (namely everything else), you can conclude that Praat will be able to read a much shorter version of "
+	"the file above. And indeed, when you choose @@Save as short text file...@ from the #New menu, your file will consist of "
+	"the following text, "
+	"with every piece of data alone on a separate line:")
+CODE (U"File type = \"ooTextFile\"")
+CODE (U"Object class = \"TextGrid\"")
+CODE (U"")
+CODE (U"0")
+CODE (U"2.3")
+CODE (U"<exists>")
+CODE (U"3")
+CODE (U"\"IntervalTier\"")
+CODE (U"\"Mary\"")
+CODE (U"0")
+CODE (U"2.3")
+CODE (U"1")
+CODE (U"0")
+CODE (U"2.3")
+CODE (U"\"\"")
+CODE (U"\"IntervalTier\"")
+CODE (U"\"John\"")
+CODE (U"0")
+CODE (U"2.3")
+CODE (U"1")
+CODE (U"0")
+CODE (U"2.3")
+CODE (U"\"\"")
+CODE (U"\"TextTier\"")
+CODE (U"\"bell\"")
+CODE (U"0")
+CODE (U"2.3")
+CODE (U"0")
+NORMAL (U"That's much less human-readable than before, but equally computer-readable, at least by Praat. "
+	"When you write your own TextGrid file recognizer, you should be able to interpret both versions shown above, "
+	"and also any version that is intermediate between the two, as long as it has the data written as freestanding numbers, "
+	"texts, and flags. For instance, a human-readable TextGrid file that can be interpreted by Praat could look "
+	"as follows:")
+CODE (U"\"ooTextFile\"")
+CODE (U"\"TextGrid\"")
+CODE (U"0  2.3  ! time domain of TextGrid")
+CODE (U"<exists>")
+CODE (U"3 tiers")
+CODE (U"\"IntervalTier\"  \"Mary\"  ! type and name of tier 1")
+CODE (U"0  2.3  ! time domain of tier 1")
+CODE (U"1 interval coming")
+CODE (U"0  2.3  \"\"  ! interval 1 on tier 1")
+CODE (U"\"IntervalTier\"  \"John\"  ! type and name of tier 2")
+CODE (U"0  2.3  ! time domain of tier 2")
+CODE (U"1 interval coming")
+CODE (U"0  2.3  \"\"  ! interval 1 on tier 2")
+CODE (U"\"TextTier\"  \"bell\"  ! type and name of tier 3")
+CODE (U"0  2.3  ! time domain of tier 3")
+CODE (U"0 points coming")
+NORMAL (U"Here we see that multiple pieces of data can be together on a line, as long as each of them stands free; "
+	"the only layout requirement is that the text \"ooTextFile\" has to be alone on the first line.")
+NORMAL (U"Another thing we see is that there is an additional type of comment: everything that follows an "
+	"exclamation mark on the same line is considered a comment. Thus, although some lines seem to end in a free-standing "
+	"number (1, 2, or 3), those numbers do not count as data, because they are part of a comment that follows "
+	"an exclamation mark.")
+ENTRY (U"3. Reading a TextGrid file")
+NORMAL (U"Reading the contents of a TextGrid file into your own data structure is fairly easy. "
+	"For instance, to figure out how many intervals there in a tier, you do not have to read multiple lines and then backtrack "
+	"to see where the list of intervals ends. Instead, the number of intervals is given before the intervals are enumerated.")
+ENTRY (U"4. Writing a TextGrid file")
+NORMAL (U"Writing the contents of a TextGrid file involves deciding on a level of human readability.")
+ENTRY (U"5. A TextGrid file with more than the minimal content")
+NORMAL (U"The above example was about a rather uninteresting TextGrid object, with no text in it. Suppose instead that "
+	"the sound was a recording of speaker saying a sentence, and your TextGrid annotates the sentence orthographically "
+	"as well as phonetically, and also annotates two chimes of the bell:")
+SCRIPT (6.0, 3.0, U""
+	"textgrid = Create TextGrid: 0, 2.3, \"sentence phonemes bell\", \"bell\"\n"
+	"Set interval text: 1, 1, \"říkej \"\"ahoj\"\" dvakrát\"\n"
+	"Insert boundary: 2, 0.7\n"
+	"Insert boundary: 2, 1.6\n"
+	"Set interval text: 2, 1, \"r̝iːkɛj\"\n"
+	"Set interval text: 2, 2, \"ʔaɦɔj\"\n"
+	"Set interval text: 2, 3, \"dʋakraːt\"\n"
+	"Insert point: 3, 0.9, \"ding\"\n"
+	"Insert point: 3, 1.3, \"dong\"\n"
+	"Draw: 0.0, 0.0, 1, 1, 1\n")
+NORMAL (U"When you save this as a full text file, it will look as follows:")
+CODE (U"File type = \"ooTextFile\"")
+CODE (U"Object class = \"TextGrid\"")
+CODE (U"")
+CODE (U"xmin = 0")
+CODE (U"xmax = 2.3")
+CODE (U"tiers? <exists>")
+CODE (U"size = 3")
+CODE (U"item []:")
+	CODE1 (U"item [1]:")
+		CODE2 (U"class = \"IntervalTier\"")
+		CODE2 (U"name = \"sentence\"")
+		CODE2 (U"xmin = 0")
+		CODE2 (U"xmax = 2.3")
+		CODE2 (U"intervals: size = 1")
+		CODE2 (U"intervals [1]:")
+			CODE3 (U"xmin = 0")
+			CODE3 (U"xmax = 2.3")
+			CODE3 (U"text = \"říkej \"\"ahoj\"\" dvakrát\"")
+	CODE1 (U"item [2]:")
+		CODE2 (U"class = \"IntervalTier\"")
+		CODE2 (U"name = \"phonemes\"")
+		CODE2 (U"xmin = 0")
+		CODE2 (U"xmax = 2.3")
+		CODE2 (U"intervals: size = 3")
+		CODE2 (U"intervals [1]:")
+			CODE3 (U"xmin = 0")
+			CODE3 (U"xmax = 0.7")
+			CODE3 (U"text = \"r̝iːkɛj\"")
+		CODE2 (U"intervals [2]:")
+			CODE3 (U"xmin = 0.7")
+			CODE3 (U"xmax = 1.6")
+			CODE3 (U"text = \"ʔaɦɔj\"")
+		CODE2 (U"intervals [3]:")
+			CODE3 (U"xmin = 1.6")
+			CODE3 (U"xmax = 2.3")
+			CODE3 (U"text = \"dʋakraːt\"")
+	CODE1 (U"item [3]:")
+		CODE2 (U"class = \"TextTier\"")
+		CODE2 (U"name = \"bell\"")
+		CODE2 (U"xmin = 0")
+		CODE2 (U"xmax = 2.3")
+		CODE2 (U"points: size = 2")
+		CODE2 (U"points [1]:")
+			CODE3 (U"number = 0.9")
+			CODE3 (U"mark = \"ding\"")
+		CODE2 (U"points [2]:")
+			CODE3 (U"number = 1.3")
+			CODE3 (U"mark = \"dong\"")
+NORMAL (U"We now see how points on a point tier are written: with their time ($number) and their text ($mark). "
+	"As usual, most of the contents of the file is comments; for instance, older TextGrid files may call "
+	"the time of the point $time instead of $number, but as these are just comments, Praat will ignore these words "
+	"when reading the file, and so should anybody who programs a TextGrid file parser.")
+NORMAL (U"A thing to note is the doubling of double quotes. The sentence in tier 1 contains double quotes around %ahoj, "
+	"as you can see in the picture above, and you typed only these two double quotes in the TextGrid window to start with. "
+	"However, the file format uses double quotes to mark texts, so if a text itself contains a double quote, "
+	"something special has to be done about it lest Praat think that you're ending the text. The solution that Praat chooses "
+	"is that a double quote that appears in a text is written as a %doubled double quote in the text file, as above on tier 1.")
+ENTRY (U"6. Restrictions in a TextGrid object")
+NORMAL (U"TextGrid object maintain several invariants, some stronger and some weaker.")
+NORMAL (U"The two strongest invariants within an interval tier are %%positive duration% and %adjacency. "
+	"That is, the end time of each interval has to be greater than the starting time of that same interval, "
+	"and the starting time of each interval (except the first) has to be equal to the end time of the previous interval. "
+	"As a result, the union of the time domains of the set of intervals in a tier is a contiguous stretch of time, "
+	"and no intervals overlap. If a TextGrid file violates these invariants, Praat may refuse to read the file and give "
+	"an error message instead (or Praat may try to repair the TextGrid, but that is not guaranteed).")
+NORMAL (U"A weaker invariant is that the starting time of the first interval on a tier equals the starting time of that tier, "
+	"and the end time of the last interval equals the end time of the tier. When you create a TextGrid with Praat, "
+	"this invariant is automatically maintained, and most types of modifications also maintain it, except sometimes the commands "
+	"that combine multiple TextGrid objects with different durations into a new TextGrid. "
+	"Praat will happily read TextGrid files that do not honour this weak invariant, and will also display such a TextGrid "
+	"reasonably well in a TextGrid window. It is nevertheless advisable for other programs that create TextGrids "
+	"to honour this weak invariant.")
+NORMAL (U"For a point tier, a strong invariant is that the time of each point (except the first) has to be greater than the time "
+	"of the previous point. Praat maintains this invariant for instance by refusing to insert a point at a time of an existing "
+	"point. TextGrid files that violate this invariant may or may not be read by Praat, and may cause strange behviour in Praat "
+	"if they are read.")
+NORMAL (U"A further weak invariant is that the starting and end times of each tier equal the starting and end times of the whole "
+	"TextGrid. This can be violated by combining multiple TextGrids into one, but other programs are advised to create TextGrids "
+	"that honour this invariant, because TextGrids that violate it may look strange to the user.")
+ENTRY (U"7. Text encoding")
+NORMAL (U"Existing TextGrid text files come in various encoding. When creating a parser for TextGrid text files, "
+	"you should be prepared for reading it in UTF-8 encoding (without Byte Order Mark), or in UTF-16 encoding "
+	"(either Big-Endian or Little-Endian, with Byte Order Mark). Pre-Unicode TextGrid text files may have a Latin-1 encoding "
+	"if they were created on Windows or Linux, or a MacRoman encoding if they were created on a Mac, "
+	"so it would be good to prepare for such old files as well, although it may be difficult to figure out which is which "
+	"(line separators, as described below, may help).")
+NORMAL (U"When writing a TextGrid text file, you can use UTF-8 encoding (without Byte Order Mark), or UTF-16 encoding "
+	"(either Big-Endian or Little-Endian, with Byte Order Mark). "
+	"Please never write a limited encoding such as Latin-1 or MacRoman.")
+NORMAL (U"The lines in the file are typically separated by a newline symbol (Linux or modern Mac), "
+	"or by a Return symbol (old Mac), or by a Return symbol followed by a newline symbol (Windows). "
+	"When reading a TextGrid text file, you should be prepared for each of these line separators. "
+	"When writing a TextGrid text file, you can use any of these line separators, because most text editors "
+	"on all platforms can meanwhile open and view all these versions correctly.")
+ENTRY (U"8. Interpreting trigraphs")
+NORMAL (U"The example above contains several phonetci sysmbols, and it is not always to type those into a text field. "
+	"For this reason, Praat provides %trigraphs for most phonetic characters, as well as for many non-ASCII characters "
+	"used in the languages of the world. For instance, the vowel \"ɔ\" (a \"turned c\") can be typed as \"\\bsct\" into "
+	"the TextGrid window as well as anywhere else in Praat where you want to draw graphical text "
+	"(see @@Special symbols@ for all trigraphs). Thus, the file above could have looked as follows:")
+CODE (U"File type = \"ooTextFile\"")
+CODE (U"Object class = \"TextGrid\"")
+CODE (U"")
+CODE (U"xmin = 0")
+CODE (U"xmax = 2.3")
+CODE (U"tiers? <exists>")
+CODE (U"size = 3")
+CODE (U"item []:")
+	CODE1 (U"item [1]:")
+		CODE2 (U"class = \"IntervalTier\"")
+		CODE2 (U"name = \"sentence\"")
+		CODE2 (U"xmin = 0")
+		CODE2 (U"xmax = 2.3")
+		CODE2 (U"intervals: size = 1")
+		CODE2 (U"intervals [1]:")
+			CODE3 (U"xmin = 0")
+			CODE3 (U"xmax = 2.3")
+			CODE3 (U"text = \"\\bsr<\\bsi'kej \"\"ahoj\"\" dvakr\\bsa't\"")
+	CODE1 (U"item [2]:")
+		CODE2 (U"class = \"IntervalTier\"")
+		CODE2 (U"name = \"phonemes\"")
+		CODE2 (U"xmin = 0")
+		CODE2 (U"xmax = 2.3")
+		CODE2 (U"intervals: size = 3")
+		CODE2 (U"intervals [1]:")
+			CODE3 (U"xmin = 0")
+			CODE3 (U"xmax = 0.7")
+			CODE3 (U"text = \"r\\bsTvi\\bs:fk\\bsefj\"")
+		CODE2 (U"intervals [2]:")
+			CODE3 (U"xmin = 0.7")
+			CODE3 (U"xmax = 1.6")
+			CODE3 (U"text = \"\\bs?ga\\bsh\\^ \\bsctj\"")
+		CODE2 (U"intervals [3]:")
+			CODE3 (U"xmin = 1.6")
+			CODE3 (U"xmax = 2.3")
+			CODE3 (U"text = \"d\\bsvsakra\\bs:ft\"")
+	CODE1 (U"item [3]:")
+		CODE2 (U"class = \"TextTier\"")
+		CODE2 (U"name = \"bell\"")
+		CODE2 (U"xmin = 0")
+		CODE2 (U"xmax = 2.3")
+		CODE2 (U"points: size = 2")
+		CODE2 (U"points [1]:")
+			CODE3 (U"number = 0.9")
+			CODE3 (U"mark = \"ding\"")
+		CODE2 (U"points [2]:")
+			CODE3 (U"number = 1.3")
+			CODE3 (U"mark = \"dong\"")
+NORMAL (U"On the screen, this TextGrid looks the same as before:")
+SCRIPT (6.0, 3.0, U""
+	"textgrid = Create TextGrid: 0, 2.3, \"sentence phonemes bell\", \"bell\"\n"
+	"Set interval text: 1, 1, \"\\r<\\i'kej \"\"ahoj\"\" dvakr\\a't\"\n"
+	"Insert boundary: 2, 0.7\n"
+	"Insert boundary: 2, 1.6\n"
+	"Set interval text: 2, 1, \"r\\Tvi\\:fk\\efj\"\n"
+	"Set interval text: 2, 2, \"\\?ga\\h^\\ctj\"\n"
+	"Set interval text: 2, 3, \"d\\vsakra\\:ft\"\n"
+	"Insert point: 3, 0.9, \"ding\"\n"
+	"Insert point: 3, 1.3, \"dong\"\n"
+	"Draw: 0.0, 0.0, 1, 1, 1\n")
+NORMAL (U"There are several hundreds of such trigraphs, and a few more might be added in the future. "
+	"When you create a TextGrid file parser and want to interpret the trigraphs in the correct way, "
+	"it is advisable to have Praat do the conversion for you: read the TextGrid file into Praat, "
+	"call the menu command ##Convert to Unicode#, and save the TextGrid as a new text file.")
+ENTRY (U"9. The binary TextGrid file format")
+NORMAL (U"Besides the TextGrid text file format described above, TextGrid objects can also be saved as binary files "
+	"with @@Save as binary file... at . If you need a description of this format, we can add it here on request. "
+	"When you want to create only a TextGrid %text file parser, and still want to support binary TextGrid files, "
+	"you can have Praat do the conversion for you: read the binary TextGrid file into Praat with @@Read from file...@ "
+	"and save the resulting TextGrid object as a text file with @@Save as text file... at .")
+MAN_END
+
 MAN_BEGIN (U"Programming with Praat", U"ppgb", 20151028)
 INTRO (U"You can extend the functionality of the Praat program "
 	"by adding modules written in C or C++ to it. All of Praat's source code "
@@ -38,7 +403,7 @@ NORMAL (U"You obtain the Praat source code from GitHub (https://github.com/praat
 	"The result will be a set of directories "
 	"called #kar, #num, #external (with #GSL, #glpk, #FLAC, #mp3, #portaudio and #espeak in it), "
 	"#sys, #dwsys, #stat, #fon, #dwtools, #LPC, #FFNet, #gram, #artsynth, #EEG, #contrib, #main, #makefiles, #test, and #dwtest, "
-	"plus a makefile and an Xcode project for Macintosh.")
+	"plus a makefile and an Xcode project for MacOS X.")
 ENTRY (U"3. Building Praat")
 NORMAL (U"Consult the README file on GitHub for directions to compile and link Praat for your platform.")
 ENTRY (U"4. Extending Praat")
diff --git a/fon/manual_soundFiles.cpp b/fon/manual_soundFiles.cpp
index f4c92f6..186fa02 100644
--- a/fon/manual_soundFiles.cpp
+++ b/fon/manual_soundFiles.cpp
@@ -331,7 +331,7 @@ NORMAL (U"The format of the original sound files may be 16-bit linear "
 	"(with big-endian or little-endian byte order), 8-bit linear (signed or unsigned), "
 	"8-bit μ-law, or 8-bit A-law. The format of the resulting sound file is always "
 	"16-bit linear, with an appropriate default byte order. The following commands "
-	"are available in the @@Save menu@ of you select any combination of @LongSound "
+	"are available in the @@Save menu@ if you select any combination of @LongSound "
 	"and/or @Sound objects:")
 LIST_ITEM (U"• @@Save as WAV file...@ (little-endian)")
 LIST_ITEM (U"• @@Save as AIFF file...@ (big-endian)")
diff --git a/fon/manual_tutorials.cpp b/fon/manual_tutorials.cpp
index 509bad3..f31dd21 100644
--- a/fon/manual_tutorials.cpp
+++ b/fon/manual_tutorials.cpp
@@ -23,9 +23,13 @@
 void manual_tutorials_init (ManPages me);
 void manual_tutorials_init (ManPages me) {
 
-MAN_BEGIN (U"What's new?", U"ppgb", 20151101)
+MAN_BEGIN (U"What's new?", U"ppgb", 20151108)
 INTRO (U"Latest changes in Praat.")
 /*LIST_ITEM (U"• Manual page about @@drawing a vowel triangle at .")*/
+NORMAL (U"##6.0.05# (8 November 2015)")
+LIST_ITEM (U"• A manual page that describes @@TextGrid file formats at .")
+LIST_ITEM (U"• Corrected a bug that prevented some KlattGrid tiers from being edited.")
+LIST_ITEM (U"• 32-bit Linux: correct use of PulseAudio (note: 6.0.04 on Debian already had this correct).")
 NORMAL (U"##6.0.04# (1 November 2015)")
 LIST_ITEM (U"• Corrected a bug that caused an incorrect number in FFNet files; "
 	"unreadable FFNet files can be sent to the Praat authors for repair.")
@@ -1762,13 +1766,9 @@ ENTRY (U"To do")
 	LIST_ITEM (U"• Phoneme-to-articulation conversion??") // Mirjam Ernestus, Jul 1 1996
 ENTRY (U"Known bugs in the Windows version")
 	LIST_ITEM (U"• Cannot stand infinitesimal zooming in SpectrogramEditor.")
-	LIST_ITEM (U"• Clipboards with greys sometimes become black-and-white after use of colour.")
-ENTRY (U"Known bugs in the Linux version")
-	LIST_ITEM (U"• Sounds shorter than 200 ms do not always play (workaround: add zeroes in prefs).")
-	LIST_ITEM (U"• Keyboard shortcuts do not work if NumLock is on.")
 */
  
-MAN_BEGIN (U"Acknowledgments", U"ppgb", 20150828)
+MAN_BEGIN (U"Acknowledgments", U"ppgb", 20151103)
 NORMAL (U"The following people contributed source code to Praat:")
 LIST_ITEM (U"Paul Boersma: user interface, graphics, @printing, @@Intro|sound@, "
 	"@@Intro 3. Spectral analysis|spectral analysis@, @@Intro 4. Pitch analysis|pitch analysis@, "
@@ -1821,8 +1821,10 @@ LIST_ITEM (U"Cornell Phonetics Lab, Ithaca NY.")
 NORMAL (U"Finally we thank:")
 LIST_ITEM (U"Ton Wempe and Dirk Jan Vet, for technical support and advice.")
 LIST_ITEM (U"Daniel Hirst, for managing the Praat Discussion list.")
+LIST_ITEM (U"Rafael Laboissière and Andreas Tille, for maintaining the Debian package.")
+LIST_ITEM (U"Jason Bacon, for maintaining the FreeBSD port.")
 LIST_ITEM (U"José Joaquín Atria and Ingmar Steiner, for setting up the source-code repository on GitHub.")
-LIST_ITEM (U"Hundreds of Praat users, for notifying us of problems and thus helping us to improve Praat.")
+LIST_ITEM (U"Hundreds of Praat users, for sending suggestions and notifying us of problems and thus helping us to improve Praat.")
 MAN_END
 
 MAN_BEGIN (U"Praat menu", U"ppgb", 20050822)
diff --git a/fon/praat_Exp.cpp b/fon/praat_Exp.cpp
index bc2a4cd..c5c2160 100644
--- a/fon/praat_Exp.cpp
+++ b/fon/praat_Exp.cpp
@@ -64,7 +64,7 @@ DIRECT2 (ExperimentMFC_extractResults) {
 	WHERE (SELECTED) {
 		iam_LOOP (ExperimentMFC);
 		autoResultsMFC thee = ExperimentMFC_extractResults (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -75,7 +75,7 @@ DIRECT2 (ResultsMFC_getNumberOfTrials) {
 	Melder_information (my numberOfTrials);
 END2 }
 
-FORM (ResultsMFC_getResponse, U"ResultsMFC: Get response", 0) {
+FORM (ResultsMFC_getResponse, U"ResultsMFC: Get response", nullptr) {
 	NATURAL (U"Trial", U"1")
 	OK2
 DO
@@ -86,7 +86,7 @@ DO
 	Melder_information (my result [trial]. response);
 END2 }
 
-FORM (ResultsMFC_getStimulus, U"ResultsMFC: Get stimulus", 0) {
+FORM (ResultsMFC_getStimulus, U"ResultsMFC: Get stimulus", nullptr) {
 	NATURAL (U"Trial", U"1")
 	OK2
 DO
@@ -98,17 +98,18 @@ DO
 END2 }
 
 DIRECT2 (ResultsMFC_removeUnsharedStimuli) {
-	ResultsMFC res1 = NULL, res2 = NULL;
+	ResultsMFC res1 = nullptr, res2 = nullptr;
 	WHERE (SELECTED) { if (res1) res2 = (ResultsMFC) OBJECT; else res1 = (ResultsMFC) OBJECT; }
 	Melder_assert (res1 && res2);
-	praat_new (ResultsMFC_removeUnsharedStimuli (res1, res2), res2 -> name, U"_shared");
+	autoResultsMFC result = ResultsMFC_removeUnsharedStimuli (res1, res2);
+	praat_new (result.move(), res2 -> name, U"_shared");
 END2 }
 
 DIRECT2 (ResultsMFC_to_Categories_stimuli) {
 	WHERE (SELECTED) {
 		iam_LOOP (ResultsMFC);
 		autoCategories thee = ResultsMFC_to_Categories_stimuli (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -116,7 +117,7 @@ DIRECT2 (ResultsMFC_to_Categories_responses) {
 	WHERE (SELECTED) {
 		iam_LOOP (ResultsMFC);
 		autoCategories thee = ResultsMFC_to_Categories_responses (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -128,14 +129,14 @@ DIRECT2 (ResultsMFCs_to_Table) {
 		Collection_addItem (collection.peek(), me);
 	}
 	autoTable thee = ResultsMFCs_to_Table (collection.peek());
-	praat_new (thee.transfer(), U"allResults");
+	praat_new (thee.move(), U"allResults");
 END2 }
 
 /***** buttons *****/
 
 void praat_uvafon_Exp_init ();
 void praat_uvafon_Exp_init () {
-	Thing_recognizeClassesByName (classExperimentMFC, classResultsMFC, NULL);
+	Thing_recognizeClassesByName (classExperimentMFC, classResultsMFC, nullptr);
 
 	praat_addAction1 (classCategories, 0, U"Sort", 0, 0, DO_Categories_sort);
 	praat_addAction1 (classCategories, 1, U"Get entropy", 0, 0, DO_Categories_getEntropy);
diff --git a/fon/praat_Fon.cpp b/fon/praat_Fon.cpp
index 256af2b..bb4406b 100644
--- a/fon/praat_Fon.cpp
+++ b/fon/praat_Fon.cpp
@@ -192,14 +192,14 @@ DO
 	double startTime = GET_REAL (U"Start time"), endTime = GET_REAL (U"End time");
 	if (endTime <= startTime) Melder_throw (U"End time must be greater than start time.");
 	autoAmplitudeTier thee = AmplitudeTier_create (startTime, endTime);
-	praat_new (thee.transfer(), GET_STRING (U"Name"));
+	praat_new (thee.move(), GET_STRING (U"Name"));
 END2 }
 
 DIRECT2 (AmplitudeTier_downto_PointProcess) {
 	LOOP {
 		iam (AmplitudeTier);
 		autoPointProcess thee = AnyTier_downto_PointProcess (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -207,7 +207,7 @@ DIRECT2 (AmplitudeTier_downto_TableOfReal) {
 	LOOP {
 		iam (AmplitudeTier);
 		autoTableOfReal thee = AmplitudeTier_downto_TableOfReal (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -349,7 +349,7 @@ DO
 	LOOP {
 		iam (AmplitudeTier);
 		autoIntensityTier thee = AmplitudeTier_to_IntensityTier (me, GET_REAL (U"Threshold"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -361,7 +361,7 @@ DO
 	LOOP {
 		iam (AmplitudeTier);
 		autoSound thee = AmplitudeTier_to_Sound (me, GET_REAL (U"Sampling frequency"), GET_INTEGER (U"Interpolation depth"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -380,7 +380,7 @@ DIRECT2 (Sound_AmplitudeTier_multiply) {
 		if (CLASS == classAmplitudeTier) tier = (AmplitudeTier) OBJECT;
 	}
 	autoSound thee = Sound_AmplitudeTier_multiply (sound, tier);
-	praat_new (thee.transfer(), sound -> name, U"_amp");
+	praat_new (thee.move(), sound -> name, U"_amp");
 END2 }
 
 /***** COCHLEAGRAM *****/
@@ -445,7 +445,7 @@ DO
 	LOOP {
 		iam (Cochleagram);
 		autoExcitation thee = Cochleagram_to_Excitation (me, GET_REAL (U"Time"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -453,7 +453,7 @@ DIRECT2 (Cochleagram_to_Matrix) {
 	LOOP {
 		iam (Cochleagram);
 		autoMatrix thee = Cochleagram_to_Matrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -488,7 +488,7 @@ DO
 	LOOP {
 		iam (Distributions);
 		autoTransition thee = Distributions_to_Transition (me, NULL, GET_INTEGER (U"Environment"), NULL, GET_INTEGER (U"Greedy"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -504,7 +504,7 @@ DO
 		if (CLASS == classTransition) trans = (Transition) OBJECT;
 	}
 	autoTransition thee = Distributions_to_Transition (dist, NULL, GET_INTEGER (U"Environment"), trans, GET_INTEGER (U"Greedy"));
-	praat_new (thee.transfer());
+	praat_new (thee.move());
 END2 }
 
 FORM (Distributions_to_Transition_noise, U"To Transition (noise)", 0) {
@@ -515,7 +515,7 @@ DO
 	Distributions underlying = NULL, surface = NULL;
 	LOOP (underlying ? surface : underlying) = (Distributions) OBJECT;
 	autoTransition thee = Distributions_to_Transition (underlying, surface, GET_INTEGER (U"Environment"), NULL, GET_INTEGER (U"Greedy"));
-	praat_new (thee.transfer());
+	praat_new (thee.move());
 END2 }
 
 FORM (Distributions_to_Transition_noise_adj, U"To Transition (noise)", 0) {
@@ -530,7 +530,7 @@ DO
 		if (CLASS == classTransition) trans = (Transition) OBJECT;
 	}
 	autoTransition thee = Distributions_to_Transition (underlying, surface, GET_INTEGER (U"Environment"), trans, GET_INTEGER (U"Greedy"));
-	praat_new (thee.transfer());
+	praat_new (thee.move());
 END2 }
 
 /***** DISTRIBUTIONS & TRANSITION *****/
@@ -543,7 +543,7 @@ DIRECT2 (Distributions_Transition_map) {
 		if (CLASS == classTransition) trans = (Transition) OBJECT;
 	}
 	autoDistributions thee = Distributions_Transition_map (dist, trans);
-	praat_new (thee.transfer(), U"surface");
+	praat_new (thee.move(), U"surface");
 END2 }
 
 /***** DURATIONTIER *****/
@@ -569,14 +569,14 @@ DO
 	double startTime = GET_REAL (U"Start time"), endTime = GET_REAL (U"End time");
 	if (endTime <= startTime) Melder_throw (U"End time must be greater than start time.");
 	autoDurationTier thee = DurationTier_create (startTime, endTime);
-	praat_new (thee.transfer(), GET_STRING (U"Name"));
+	praat_new (thee.move(), GET_STRING (U"Name"));
 END2 }
 
 DIRECT2 (DurationTier_downto_PointProcess) {
 	LOOP {
 		iam (DurationTier);
 		autoPointProcess thee = AnyTier_downto_PointProcess (OBJECT);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -714,7 +714,7 @@ DO
 	LOOP {
 		iam (Excitation);
 		autoFormant thee = Excitation_to_Formant (me, GET_INTEGER (U"Maximum number of formants"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -722,7 +722,7 @@ DIRECT2 (Excitation_to_Matrix) {
 	LOOP {
 		iam (Excitation);
 		autoMatrix thee = Excitation_to_Matrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -732,7 +732,7 @@ DIRECT2 (Formant_downto_FormantGrid) {
 	LOOP {
 		iam (Formant);
 		autoFormantGrid thee = Formant_downto_FormantGrid (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -740,7 +740,7 @@ DIRECT2 (Formant_downto_FormantTier) {
 	LOOP {
 		iam (Formant);
 		autoFormantTier thee = Formant_downto_FormantTier (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1051,7 +1051,7 @@ DO
 			GET_INTEGER (U"Include intensity"), GET_INTEGER (U"Intensity decimals"),
 			GET_INTEGER (U"Include number of formants"), GET_INTEGER (U"Frequency decimals"),
 			GET_INTEGER (U"Include bandwidths"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1118,7 +1118,7 @@ DO
 	LOOP {
 		iam (Formant);
 		autoMatrix thee = Formant_to_Matrix (me, GET_INTEGER (U"Formant"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1143,48 +1143,48 @@ DO
 			GET_REAL (U"Reference F3"), GET_REAL (U"Reference F4"),
 			GET_REAL (U"Reference F5"), GET_REAL (U"Frequency cost"),
 			GET_REAL (U"Bandwidth cost"), GET_REAL (U"Transition cost"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
 /***** FORMANT & POINTPROCESS *****/
 
 DIRECT2 (Formant_PointProcess_to_FormantTier) {
-	Formant formant = NULL;
-	PointProcess point = NULL;
+	Formant formant = nullptr;
+	PointProcess point = nullptr;
 	LOOP {
 		if (CLASS == classFormant) formant = (Formant) OBJECT;
 		if (CLASS == classPointProcess) point = (PointProcess) OBJECT;
 		if (formant && point) break;
 	}
 	autoFormantTier thee = Formant_PointProcess_to_FormantTier (formant, point);
-	praat_new (thee.transfer(), formant -> name, U"_", point -> name);
+	praat_new (thee.move(), formant -> name, U"_", point -> name);
 END2 }
 
 /***** FORMANT & SOUND *****/
 
 DIRECT2 (Sound_Formant_filter) {
-	Sound sound = NULL;
-	Formant formant = NULL;
+	Sound sound = nullptr;
+	Formant formant = nullptr;
 	LOOP {
 		if (CLASS == classSound) sound = (Sound) OBJECT;
 		if (CLASS == classFormant) formant = (Formant) OBJECT;
 		if (sound && formant) break;
 	}
 	autoSound thee = Sound_Formant_filter (sound, formant);
-	praat_new (thee.transfer(), sound -> name, U"_filt");
+	praat_new (thee.move(), sound -> name, U"_filt");
 END2 }
 
 DIRECT2 (Sound_Formant_filter_noscale) {
-	Sound sound = NULL;
-	Formant formant = NULL;
+	Sound sound = nullptr;
+	Formant formant = nullptr;
 	LOOP {
 		if (CLASS == classSound) sound = (Sound) OBJECT;
 		if (CLASS == classFormant) formant = (Formant) OBJECT;
 		if (sound && formant) break;
 	}
 	autoSound thee = Sound_Formant_filter_noscale (sound, formant);
-	praat_new (thee.transfer(), sound -> name, U"_filt");
+	praat_new (thee.move(), sound -> name, U"_filt");
 END2 }
 
 /***** FORMANTGRID *****/
@@ -1231,7 +1231,7 @@ DO
 	autoFormantGrid thee = FormantGrid_create (startTime, endTime, GET_INTEGER (U"Number of formants"),
 		GET_REAL (U"Initial first formant"), GET_REAL (U"Initial formant spacing"),
 		GET_REAL (U"Initial first bandwidth"), GET_REAL (U"Initial bandwidth spacing"));
-	praat_new (thee.transfer(), GET_STRING (U"Name"));
+	praat_new (thee.move(), GET_STRING (U"Name"));
 END2 }
 
 static void cb_FormantGridEditor_publish (Editor me, void *closure, Daata publish) {
@@ -1332,7 +1332,7 @@ DO
 	LOOP {
 		iam (FormantGrid);
 		autoFormant thee = FormantGrid_to_Formant (me, GET_REAL (U"Time step"), intensity);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1347,7 +1347,7 @@ DIRECT2 (Sound_FormantGrid_filter) {
 		if (me && grid) break;   // OPTIMIZE
 	}
 	autoSound thee = Sound_FormantGrid_filter (me, grid);
-	praat_new (thee.transfer(), my name, U"_filt");
+	praat_new (thee.move(), my name, U"_filt");
 END2 }
 
 DIRECT2 (Sound_FormantGrid_filter_noscale) {
@@ -1359,7 +1359,7 @@ DIRECT2 (Sound_FormantGrid_filter_noscale) {
 		if (me && grid) break;   // OPTIMIZE
 	}
 	autoSound thee = Sound_FormantGrid_filter_noscale (me, grid);
-	praat_new (thee.transfer(), my name, U"_filt");
+	praat_new (thee.move(), my name, U"_filt");
 END2 }
 
 /***** FORMANTTIER *****/
@@ -1395,7 +1395,7 @@ DO
 	double startTime = GET_REAL (U"Start time"), endTime = GET_REAL (U"End time");
 	if (endTime <= startTime) Melder_throw (U"End time must be greater than start time.");
 	autoFormantTier thee = FormantTier_create (startTime, endTime);
-	praat_new (thee.transfer(), GET_STRING (U"Name"));
+	praat_new (thee.move(), GET_STRING (U"Name"));
 END2 }
 
 FORM (FormantTier_downto_TableOfReal, U"Down to TableOfReal", 0) {
@@ -1406,7 +1406,7 @@ DO
 	LOOP {
 		iam (FormantTier);
 		autoTableOfReal thee = FormantTier_downto_TableOfReal (me, GET_INTEGER (U"Include formants"), GET_INTEGER (U"Include bandwidths"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1462,7 +1462,7 @@ DIRECT2 (Sound_FormantTier_filter) {
 		if (me && tier) break;   // OPTIMIZE
 	}
 	autoSound thee = Sound_FormantTier_filter (me, tier);
-	praat_new (thee.transfer(), my name, U"_filt");
+	praat_new (thee.move(), my name, U"_filt");
 END2 }
 
 DIRECT2 (Sound_FormantTier_filter_noscale) {
@@ -1474,7 +1474,7 @@ DIRECT2 (Sound_FormantTier_filter_noscale) {
 		if (me && tier) break;   // OPTIMIZE
 	}
 	autoSound thee = Sound_FormantTier_filter_noscale (me, tier);
-	praat_new (thee.transfer(), my name, U"_filt");
+	praat_new (thee.move(), my name, U"_filt");
 END2 }
 
 /***** HARMONICITY *****/
@@ -1613,7 +1613,7 @@ DIRECT2 (Harmonicity_to_Matrix) {
 	LOOP {
 		iam (Harmonicity);
 		autoMatrix thee = Harmonicity_to_Matrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1638,7 +1638,7 @@ DIRECT2 (Intensity_downto_IntensityTier) {
 	LOOP {
 		iam (Intensity);
 		autoIntensityTier thee = Intensity_downto_IntensityTier (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1646,7 +1646,7 @@ DIRECT2 (Intensity_downto_Matrix) {
 	LOOP {
 		iam (Intensity);
 		autoMatrix thee = Intensity_to_Matrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1800,7 +1800,7 @@ DIRECT2 (Intensity_to_IntensityTier_peaks) {
 	LOOP {
 		iam (Intensity);
 		autoIntensityTier thee = Intensity_to_IntensityTier_peaks (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1808,7 +1808,7 @@ DIRECT2 (Intensity_to_IntensityTier_valleys) {
 	LOOP {
 		iam (Intensity);
 		autoIntensityTier thee = Intensity_to_IntensityTier_valleys (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1826,8 +1826,8 @@ FORM (Pitch_Intensity_draw, U"Plot intensity by pitch", 0) {
 		RADIOBUTTON (U"Speckles and curve")
 	OK2
 DO
-	Pitch pitch = NULL;
-	Intensity intensity = NULL;
+	Pitch pitch = nullptr;
+	Intensity intensity = nullptr;
 	LOOP {
 		if (CLASS == classPitch) pitch = (Pitch) OBJECT;
 		if (CLASS == classIntensity) intensity = (Intensity) OBJECT;
@@ -1847,8 +1847,8 @@ FORM (Pitch_Intensity_speckle, U"Plot intensity by pitch", 0) {
 	BOOLEAN (U"Garnish", 1)
 	OK2
 DO
-	Pitch pitch = NULL;
-	Intensity intensity = NULL;
+	Pitch pitch = nullptr;
+	Intensity intensity = nullptr;
 	LOOP {
 		if (CLASS == classPitch) pitch = (Pitch) OBJECT;
 		if (CLASS == classIntensity) intensity = (Intensity) OBJECT;
@@ -1863,15 +1863,15 @@ END2 }
 /***** INTENSITY & POINTPROCESS *****/
 
 DIRECT2 (Intensity_PointProcess_to_IntensityTier) {
-	Intensity intensity = NULL;
-	PointProcess point = NULL;
+	Intensity intensity = nullptr;
+	PointProcess point = nullptr;
 	LOOP {
 		if (CLASS == classIntensity) intensity = (Intensity) OBJECT;
 		if (CLASS == classPointProcess) point = (PointProcess) OBJECT;
 		if (intensity && point) break;   // OPTIMIZE
 	}
 	autoIntensityTier thee = Intensity_PointProcess_to_IntensityTier (intensity, point);
-	praat_new (thee.transfer(), intensity -> name);
+	praat_new (thee.move(), intensity -> name);
 END2 }
 
 /***** INTENSITYTIER *****/
@@ -1897,14 +1897,14 @@ DO
 	double startTime = GET_REAL (U"Start time"), endTime = GET_REAL (U"End time");
 	if (endTime <= startTime) Melder_throw (U"End time must be greater than start time.");
 	autoIntensityTier thee = IntensityTier_create (startTime, endTime);
-	praat_new (thee.transfer(), GET_STRING (U"Name"));
+	praat_new (thee.move(), GET_STRING (U"Name"));
 END2 }
 
 DIRECT2 (IntensityTier_downto_PointProcess) {
 	LOOP {
 		iam (IntensityTier);
 		autoPointProcess thee = AnyTier_downto_PointProcess (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1912,7 +1912,7 @@ DIRECT2 (IntensityTier_downto_TableOfReal) {
 	LOOP {
 		iam (IntensityTier);
 		autoTableOfReal thee = IntensityTier_downto_TableOfReal (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1982,7 +1982,7 @@ DIRECT2 (IntensityTier_to_AmplitudeTier) {
 	LOOP {
 		iam (IntensityTier);
 		autoAmplitudeTier thee = IntensityTier_to_AmplitudeTier (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1994,51 +1994,51 @@ END2 }
 /***** INTENSITYTIER & POINTPROCESS *****/
 
 DIRECT2 (IntensityTier_PointProcess_to_IntensityTier) {
-	IntensityTier intensity = NULL;
-	PointProcess point = NULL;
+	IntensityTier intensity = nullptr;
+	PointProcess point = nullptr;
 	LOOP {
 		if (CLASS == classIntensityTier) intensity = (IntensityTier) OBJECT;
 		if (CLASS == classPointProcess) point = (PointProcess) OBJECT;
 		if (intensity && point) break;   // OPTIMIZE
 	}
 	autoIntensityTier thee = IntensityTier_PointProcess_to_IntensityTier (intensity, point);
-	praat_new (thee.transfer(), intensity -> name);
+	praat_new (thee.move(), intensity -> name);
 END2 }
 
 /***** INTENSITYTIER & SOUND *****/
 
 DIRECT2 (Sound_IntensityTier_multiply_old) {
-	Sound sound = NULL;
-	IntensityTier intensity = NULL;
+	Sound sound = nullptr;
+	IntensityTier intensity = nullptr;
 	LOOP {
 		if (CLASS == classSound) sound = (Sound) OBJECT;
 		if (CLASS == classIntensityTier) intensity = (IntensityTier) OBJECT;
 		if (sound && intensity) break;   // OPTIMIZE
 	}
 	autoSound thee = Sound_IntensityTier_multiply (sound, intensity, true);
-	praat_new (thee.transfer(), sound -> name, U"_int");
+	praat_new (thee.move(), sound -> name, U"_int");
 END2 }
 
 FORM (Sound_IntensityTier_multiply, U"Sound & IntervalTier: Multiply", 0) {
 	BOOLEAN (U"Scale to 0.9", 1)
 	OK2
 DO
-	Sound sound = NULL;
-	IntensityTier intensity = NULL;
+	Sound sound = nullptr;
+	IntensityTier intensity = nullptr;
 	LOOP {
 		if (CLASS == classSound) sound = (Sound) OBJECT;
 		if (CLASS == classIntensityTier) intensity = (IntensityTier) OBJECT;
 		if (sound && intensity) break;   // OPTIMIZE
 	}
 	autoSound thee = Sound_IntensityTier_multiply (sound, intensity, GET_INTEGER (U"Scale to 0.9"));
-	praat_new (thee.transfer(), sound -> name, U"_int");
+	praat_new (thee.move(), sound -> name, U"_int");
 END2 }
 
 /***** INTERVALTIER, rest in praat_TextGrid_init.cpp *****/
 
 FORM_READ2 (IntervalTier_readFromXwaves, U"Read IntervalTier from Xwaves", 0, true) {
 	autoIntervalTier me = IntervalTier_readFromXwaves (file);
-	praat_newWithFile (me.transfer(), file, MelderFile_name (file));
+	praat_newWithFile (me.move(), file, MelderFile_name (file));
 END2 }
 
 /***** LTAS *****/
@@ -2046,7 +2046,7 @@ END2 }
 DIRECT2 (Ltases_average) {
 	autoCollection ltases = praat_getSelectedObjects ();
 	autoLtas thee = Ltases_average (ltases.peek());
-	praat_new (thee.transfer(), U"averaged");
+	praat_new (thee.move(), U"averaged");
 END2 }
 
 FORM (Ltas_computeTrendLine, U"Ltas: Compute trend line", U"Ltas: Compute trend line...") {
@@ -2057,7 +2057,7 @@ DO
 	LOOP {
 		iam (Ltas);
 		autoLtas thee = Ltas_computeTrendLine (me, GET_REAL (U"left Frequency range"), GET_REAL (U"right Frequency range"));
-		praat_new (thee.transfer(), my name, U"_trend");
+		praat_new (thee.move(), my name, U"_trend");
 	}
 END2 }
 
@@ -2325,7 +2325,7 @@ END2 }
 DIRECT2 (Ltases_merge) {
 	autoCollection ltases = praat_getSelectedObjects ();
 	autoLtas thee = Ltases_merge (ltases.peek());
-	praat_new (thee.transfer(), U"merged");
+	praat_new (thee.move(), U"merged");
 END2 }
 
 FORM (Ltas_subtractTrendLine, U"Ltas: Subtract trend line", U"Ltas: Subtract trend line...") {
@@ -2336,7 +2336,7 @@ DO
 	LOOP {
 		iam (Ltas);
 		autoLtas thee = Ltas_subtractTrendLine (me, GET_REAL (U"left Frequency range"), GET_REAL (U"right Frequency range"));
-		praat_new (thee.transfer(), my name, U"_fit");
+		praat_new (thee.move(), my name, U"_fit");
 	}
 END2 }
 
@@ -2352,15 +2352,13 @@ DIRECT2 (Ltas_to_SpectrumTier_peaks) {
 	LOOP {
 		iam (Ltas);
 		autoSpectrumTier thee = Ltas_to_SpectrumTier_peaks (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
 /***** MANIPULATION *****/
 
-static void cb_ManipulationEditor_publication (Editor editor, void *closure, Daata publication) {
-	(void) editor;
-	(void) closure;
+static void cb_ManipulationEditor_publication (Editor /* editor */, void * /* closure */, Daata publication) {
 	try {
 		praat_new (publication, U"fromManipulationEditor");
 		praat_updateSelection ();
@@ -2383,7 +2381,7 @@ DIRECT2 (Manipulation_extractDurationTier) {
 		iam (Manipulation);
 		if (! my duration) Melder_throw (me, U": I don't contain a DurationTier.");
 		autoDurationTier thee = Data_copy (my duration.get());
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2392,7 +2390,7 @@ DIRECT2 (Manipulation_extractOriginalSound) {
 		iam (Manipulation);
 		if (! my sound) Melder_throw (me, U": I don't contain a Sound.");
 		autoSound thee = Data_copy (my sound.get());
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2401,7 +2399,7 @@ DIRECT2 (Manipulation_extractPitchTier) {
 		iam (Manipulation);
 		if (! my pitch) Melder_throw (me, U": I don't contain a PitchTier.");
 		autoPitchTier thee = Data_copy (my pitch.get());
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2410,7 +2408,7 @@ DIRECT2 (Manipulation_extractPulses) {
 		iam (Manipulation);
 		if (! my pulses) Melder_throw (me, U": I don't contain a PointProcess.");
 		autoPointProcess thee = Data_copy (my pulses.get());
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2418,7 +2416,7 @@ DIRECT2 (Manipulation_getResynthesis_lpc) {
 	LOOP {
 		iam (Manipulation);
 		autoSound thee = Manipulation_to_Sound (me, Manipulation_PITCH_LPC);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2426,7 +2424,7 @@ DIRECT2 (Manipulation_getResynthesis_overlapAdd) {
 	LOOP {
 		iam (Manipulation);
 		autoSound thee = Manipulation_to_Sound (me, Manipulation_OVERLAPADD);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2528,16 +2526,16 @@ DIRECT2 (Manipulation_TextTier_to_Manipulation) {
 	Manipulation me = FIRST (Manipulation);
 	TextTier thee = FIRST (TextTier);
 	autoManipulation him = Manipulation_AnyTier_to_Manipulation (me, reinterpret_cast <AnyTier> (thee));
-	praat_new (him.transfer(), my name);	
+	praat_new (him.move(), my name);
 END2 }
 
 /***** MATRIX *****/
 
 DIRECT2 (Matrix_appendRows) {
-	Matrix m1 = NULL, m2 = NULL;
+	Matrix m1 = nullptr, m2 = nullptr;
 	LOOP (m1 ? m2 : m1) = (Matrix) OBJECT;
 	autoMatrix thee = Matrix_appendRows (m1, m2, classMatrix);
-	praat_new (thee.transfer(), m1 -> name, U"_", m2 -> name);
+	praat_new (thee.move(), m1 -> name, U"_", m2 -> name);
 END2 }
 
 FORM (Matrix_create, U"Create Matrix", U"Create Matrix...") {
@@ -2564,7 +2562,7 @@ DO
 		xmin, xmax, GET_INTEGER (U"Number of columns"), GET_REAL (U"dx"), GET_REAL (U"x1"),
 		ymin, ymax, GET_INTEGER (U"Number of rows"), GET_REAL (U"dy"), GET_REAL (U"y1"));
 	Matrix_formula (me.peek(), GET_STRING (U"formula"), interpreter, NULL);
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
 FORM (Matrix_createSimple, U"Create simple Matrix", U"Create simple Matrix...") {
@@ -2577,7 +2575,7 @@ FORM (Matrix_createSimple, U"Create simple Matrix", U"Create simple Matrix...")
 DO
 	autoMatrix me = Matrix_createSimple (GET_INTEGER (U"Number of rows"), GET_INTEGER (U"Number of columns"));
 	Matrix_formula (me.peek(), GET_STRING (U"formula"), interpreter, NULL);
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
 FORM (Matrix_drawOneContour, U"Draw one altitude contour", 0) {
@@ -2637,12 +2635,10 @@ END2 }
 DIRECT2 (Matrix_eigen) {
 	LOOP {
 		iam (Matrix);
-		Matrix vec_ = NULL, val_ = NULL;
-		Matrix_eigen (me, & vec_, & val_);
-		autoMatrix vec = vec_;
-		autoMatrix val = val_;
-		praat_new (vec.transfer(), U"eigenvectors");
-		praat_new (val.transfer(), U"eigenvalues");
+		autoMatrix vectors, values;
+		Matrix_eigen (me, & vectors, & values);
+		praat_new (vectors.move(), U"eigenvectors");
+		praat_new (values.move(), U"eigenvalues");
 	}
 END2 }
 
@@ -2856,18 +2852,18 @@ DO
 	LOOP {
 		iam (Matrix);
 		autoMatrix thee = Matrix_power (me, GET_INTEGER (U"Power"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
 FORM_READ2 (Matrix_readFromRawTextFile, U"Read Matrix from raw text file", 0, true) {
 	autoMatrix me = Matrix_readFromRawTextFile (file);
-	praat_new (me.transfer(), MelderFile_name (file));
+	praat_new (me.move(), MelderFile_name (file));
 END2 }
 
 FORM_READ2 (Matrix_readAP, U"Read Matrix from LVS AP file", 0, true) {
 	autoMatrix me = Matrix_readAP (file);
-	praat_new (me.transfer(), MelderFile_name (file));
+	praat_new (me.move(), MelderFile_name (file));
 END2 }
 
 FORM (Matrix_setValue, U"Matrix: Set value", U"Matrix: Set value...") {
@@ -2890,7 +2886,7 @@ DIRECT2 (Matrix_to_Cochleagram) {
 	LOOP {
 		iam (Matrix);
 		autoCochleagram thee = Matrix_to_Cochleagram (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2898,7 +2894,7 @@ DIRECT2 (Matrix_to_Excitation) {
 	LOOP {
 		iam (Matrix);
 		autoExcitation thee = Matrix_to_Excitation (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2906,7 +2902,7 @@ DIRECT2 (Matrix_to_Harmonicity) {
 	LOOP {
 		iam (Matrix);
 		autoHarmonicity thee = Matrix_to_Harmonicity (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2914,7 +2910,7 @@ DIRECT2 (Matrix_to_Intensity) {
 	LOOP {
 		iam (Matrix);
 		autoIntensity thee = Matrix_to_Intensity (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2922,7 +2918,7 @@ DIRECT2 (Matrix_to_Pitch) {
 	LOOP {
 		iam (Matrix);
 		autoPitch thee = Matrix_to_Pitch (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2930,7 +2926,7 @@ DIRECT2 (Matrix_to_Spectrogram) {
 	LOOP {
 		iam (Matrix);
 		autoSpectrogram thee = Matrix_to_Spectrogram (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2938,7 +2934,7 @@ DIRECT2 (Matrix_to_Spectrum) {
 	LOOP {
 		iam (Matrix);
 		autoSpectrum thee = Matrix_to_Spectrum (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2946,23 +2942,23 @@ DIRECT2 (Matrix_to_Ltas) {
 	LOOP {
 		iam (Matrix);
 		autoLtas thee = Matrix_to_Ltas (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
 DIRECT2 (Matrix_to_ParamCurve) {
-	Matrix m1 = NULL, m2 = NULL;
+	Matrix m1 = nullptr, m2 = nullptr;
 	LOOP (m1 ? m2 : m1) = (Matrix) OBJECT;
 	autoSound sound1 = Matrix_to_Sound (m1), sound2 = Matrix_to_Sound (m2);
 	autoParamCurve thee = ParamCurve_create (sound1.peek(), sound2.peek());
-	praat_new (thee.transfer(), m1 -> name, U"_", m2 -> name);
+	praat_new (thee.move(), m1 -> name, U"_", m2 -> name);
 END2 }
 
 DIRECT2 (Matrix_to_PointProcess) {
 	LOOP {
 		iam (Matrix);
 		autoPointProcess thee = Matrix_to_PointProcess (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2970,7 +2966,7 @@ DIRECT2 (Matrix_to_Polygon) {
 	LOOP {
 		iam (Matrix);
 		autoPolygon thee = Matrix_to_Polygon (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2978,7 +2974,7 @@ DIRECT2 (Matrix_to_Sound) {
 	LOOP {
 		iam (Matrix);
 		autoSound thee = Matrix_to_Sound (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2990,7 +2986,7 @@ DO
 	LOOP {
 		iam (Matrix);
 		autoSound thee = Matrix_to_Sound_mono (me, GET_INTEGER (U"Row"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2998,7 +2994,7 @@ DIRECT2 (Matrix_to_TableOfReal) {
 	LOOP {
 		iam (Matrix);
 		autoTableOfReal thee = Matrix_to_TableOfReal (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -3006,7 +3002,7 @@ DIRECT2 (Matrix_to_Transition) {
 	LOOP {
 		iam (Matrix);
 		autoTransition thee = Matrix_to_Transition (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -3014,7 +3010,7 @@ DIRECT2 (Matrix_to_VocalTract) {
 	LOOP {
 		iam (Matrix);
 		autoVocalTract thee = Matrix_to_VocalTract (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -3032,7 +3028,7 @@ END
 
 FORM_READ2 (Movie_openFromSoundFile, U"Open movie file", 0, true) {
 	autoMovie me = Movie_openFromSoundFile (file);
-	praat_new (me.transfer(), MelderFile_name (file));
+	praat_new (me.move(), MelderFile_name (file));
 END2 }
 
 FORM (Movie_paintOneImage, U"Movie: Paint one image", 0) {
@@ -3117,7 +3113,7 @@ DO
 	Matrix_formula (my d_red  .get(), GET_STRING (U"redFormula"),   interpreter, NULL);
 	Matrix_formula (my d_green.get(), GET_STRING (U"greenFormula"), interpreter, NULL);
 	Matrix_formula (my d_blue .get(), GET_STRING (U"blueFormula"),  interpreter, NULL);
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
 FORM (Photo_createSimple, U"Create simple Photo", U"Create simple Photo...") {
@@ -3136,14 +3132,14 @@ DO
 	Matrix_formula (my d_red.get(),   GET_STRING (U"redFormula"),   interpreter, NULL);
 	Matrix_formula (my d_green.get(), GET_STRING (U"greenFormula"), interpreter, NULL);
 	Matrix_formula (my d_blue.get(),  GET_STRING (U"blueFormula"),  interpreter, NULL);
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
 DIRECT2 (Photo_extractBlue) {
 	LOOP {
 		iam (Photo);
 		autoMatrix thee = Data_copy (my d_blue.get());
-		praat_new (thee.transfer(), my name, U"_blue");
+		praat_new (thee.move(), my name, U"_blue");
 	}
 END2 }
 
@@ -3151,7 +3147,7 @@ DIRECT2 (Photo_extractGreen) {
 	LOOP {
 		iam (Photo);
 		autoMatrix thee = Data_copy (my d_green.get());
-		praat_new (thee.transfer(), my name, U"_green");
+		praat_new (thee.move(), my name, U"_green");
 	}
 END2 }
 
@@ -3159,7 +3155,7 @@ DIRECT2 (Photo_extractRed) {
 	LOOP {
 		iam (Photo);
 		autoMatrix thee = Data_copy (my d_red.get());
-		praat_new (thee.transfer(), my name, U"_red");
+		praat_new (thee.move(), my name, U"_red");
 	}
 END2 }
 
@@ -3167,7 +3163,7 @@ DIRECT2 (Photo_extractTransparency) {
 	LOOP {
 		iam (Photo);
 		autoMatrix thee = Data_copy (my d_transparency.get());
-		praat_new (thee.transfer(), my name, U"_transparency");
+		praat_new (thee.move(), my name, U"_transparency");
 	}
 END2 }
 
@@ -3703,7 +3699,7 @@ DIRECT2 (Pitch_interpolate) {
 	LOOP {
 		iam (Pitch);
 		autoPitch thee = Pitch_interpolate (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -3711,7 +3707,7 @@ DIRECT2 (Pitch_killOctaveJumps) {
 	LOOP {
 		iam (Pitch);
 		autoPitch thee = Pitch_killOctaveJumps (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -3729,7 +3725,7 @@ DO
 	LOOP {
 		iam (Pitch);
 		autoPitch thee = Pitch_smooth (me, GET_REAL (U"Bandwidth"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -3860,7 +3856,7 @@ DO
 	LOOP {
 		iam (Pitch);
 		autoPitch thee = Pitch_subtractLinearFit (me, GET_INTEGER (U"Unit") - 1);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -3868,7 +3864,7 @@ DIRECT2 (Pitch_to_IntervalTier) {
 	LOOP {
 		iam (Pitch);
 		autoIntervalTier thee = IntervalTier_create (my xmin, my xmax);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -3876,7 +3872,7 @@ DIRECT2 (Pitch_to_Matrix) {
 	LOOP {
 		iam (Pitch);
 		autoMatrix thee = Pitch_to_Matrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -3884,7 +3880,7 @@ DIRECT2 (Pitch_to_PitchTier) {
 	LOOP {
 		iam (Pitch);
 		autoPitchTier thee = Pitch_to_PitchTier (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -3892,28 +3888,28 @@ DIRECT2 (Pitch_to_PointProcess) {
 	LOOP {
 		iam (Pitch);
 		autoPointProcess thee = Pitch_to_PointProcess (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
 DIRECT2 (Pitch_to_Sound_pulses) {
 	LOOP {
 		iam (Pitch);
-		autoSound thee = Pitch_to_Sound (me, 0, 0, false);
-		praat_new (thee.transfer(), my name);
+		autoSound thee = Pitch_to_Sound (me, 0.0, 0.0, false);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
 DIRECT2 (Pitch_to_Sound_hum) {
 	LOOP {
 		iam (Pitch);
-		autoSound thee = Pitch_to_Sound (me, 0, 0, true);
-		praat_new (thee.transfer(), my name);
+		autoSound thee = Pitch_to_Sound (me, 0.0, 0.0, true);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
-FORM (Pitch_to_Sound_sine, U"Pitch: To Sound (sine)", 0) {
-	POSITIVE (U"Sampling frequency (Hz)", U"44100")
+FORM (Pitch_to_Sound_sine, U"Pitch: To Sound (sine)", nullptr) {
+	POSITIVE (U"Sampling frequency (Hz)", U"44100.0")
 	RADIO (U"Cut voiceless stretches", 2)
 		OPTION (U"exactly")
 		OPTION (U"at nearest zero crossings")
@@ -3921,8 +3917,8 @@ FORM (Pitch_to_Sound_sine, U"Pitch: To Sound (sine)", 0) {
 DO
 	LOOP {
 		iam (Pitch);
-		autoSound thee = Pitch_to_Sound_sine (me, 0, 0, GET_REAL (U"Sampling frequency"), GET_INTEGER (U"Cut voiceless stretches") - 1);
-		praat_new (thee.transfer(), my name);
+		autoSound thee = Pitch_to_Sound_sine (me, 0.0, 0.0, GET_REAL (U"Sampling frequency"), GET_INTEGER (U"Cut voiceless stretches") - 1);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -3934,7 +3930,7 @@ DO
 	LOOP {
 		iam (Pitch);
 		autoTextGrid thee = TextGrid_create (my xmin, my xmax, GET_STRING (U"Tier names"), GET_STRING (U"Point tiers"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -3942,13 +3938,13 @@ DIRECT2 (Pitch_to_TextTier) {
 	LOOP {
 		iam (Pitch);
 		autoTextTier thee = TextTier_create (my xmin, my xmax);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
 /***** PITCH & PITCHTIER *****/
 
-FORM (old_PitchTier_Pitch_draw, U"PitchTier & Pitch: Draw", 0) {
+FORM (old_PitchTier_Pitch_draw, U"PitchTier & Pitch: Draw", nullptr) {
 	praat_dia_timeRange (dia);
 	REAL (U"From frequency (Hz)", U"0.0")
 	REAL (U"To frequency (Hz)", U"500.0")
@@ -3969,7 +3965,7 @@ DO
 		GET_INTEGER (U"Garnish"), U"lines and speckles");
 END2 }
 
-FORM (PitchTier_Pitch_draw, U"PitchTier & Pitch: Draw", 0) {
+FORM (PitchTier_Pitch_draw, U"PitchTier & Pitch: Draw", nullptr) {
 	praat_dia_timeRange (dia);
 	REAL (U"From frequency (Hz)", U"0.0")
 	REAL (U"To frequency (Hz)", U"500.0")
@@ -3999,7 +3995,7 @@ DIRECT2 (Pitch_PitchTier_to_Pitch) {
 	Pitch pitch = FIRST (Pitch);
 	PitchTier tier = FIRST (PitchTier);
 	autoPitch thee = Pitch_PitchTier_to_Pitch (pitch, tier);
-	praat_new (thee.transfer(), pitch -> name, U"_stylized");
+	praat_new (thee.move(), pitch -> name, U"_stylized");
 END2 }
 
 /***** PITCH & POINTPROCESS *****/
@@ -4008,7 +4004,7 @@ DIRECT2 (Pitch_PointProcess_to_PitchTier) {
 	Pitch pitch = FIRST (Pitch);
 	PointProcess point = FIRST (PointProcess);
 	autoPitchTier thee = Pitch_PointProcess_to_PitchTier (pitch, point);
-	praat_new (thee.transfer(), pitch -> name);
+	praat_new (thee.move(), pitch -> name);
 END2 }
 
 /***** PITCH & SOUND *****/
@@ -4017,14 +4013,14 @@ DIRECT2 (Sound_Pitch_to_Manipulation) {
 	Pitch pitch = FIRST (Pitch);
 	Sound sound = FIRST (Sound);
 	autoManipulation thee = Sound_Pitch_to_Manipulation (sound, pitch);
-	praat_new (thee.transfer(), pitch -> name);
+	praat_new (thee.move(), pitch -> name);
 END2 }
 
 DIRECT2 (Sound_Pitch_to_PointProcess_cc) {
 	Sound sound = FIRST (Sound);
 	Pitch pitch = FIRST (Pitch);
 	autoPointProcess thee = Sound_Pitch_to_PointProcess_cc (sound, pitch);
-	praat_new (thee.transfer(), sound -> name, U"_", pitch -> name);
+	praat_new (thee.move(), sound -> name, U"_", pitch -> name);
 END2 }
 
 FORM (Sound_Pitch_to_PointProcess_peaks, U"Sound & Pitch: To PointProcess (peaks)", 0) {
@@ -4035,7 +4031,7 @@ DO
 	Sound sound = FIRST (Sound);
 	Pitch pitch = FIRST (Pitch);
 	autoPointProcess thee = Sound_Pitch_to_PointProcess_peaks (sound, pitch, GET_INTEGER (U"Include maxima"), GET_INTEGER (U"Include minima"));
-	praat_new (thee.transfer(), sound -> name, U"_", pitch -> name);
+	praat_new (thee.move(), sound -> name, U"_", pitch -> name);
 END2 }
 
 /***** PITCHTIER *****/
@@ -4061,14 +4057,14 @@ DO
 	double startTime = GET_REAL (U"Start time"), endTime = GET_REAL (U"End time");
 	if (endTime <= startTime) Melder_throw (U"End time must be greater than start time.");
 	autoPitchTier me = PitchTier_create (startTime, endTime);
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
 DIRECT2 (PitchTier_downto_PointProcess) {
 	LOOP {
 		iam (PitchTier);
 		autoPointProcess thee = AnyTier_downto_PointProcess (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4081,7 +4077,7 @@ DO
 	LOOP {
 		iam (PitchTier);
 		autoTableOfReal thee = PitchTier_downto_TableOfReal (me, GET_INTEGER (U"Unit") - 1);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4303,7 +4299,7 @@ DIRECT2 (PitchTier_to_PointProcess) {
 	LOOP {
 		iam (PitchTier);
 		autoPointProcess thee = PitchTier_to_PointProcess (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4323,7 +4319,7 @@ DO
 		autoSound thee = PitchTier_to_Sound_phonation (me, GET_REAL (U"Sampling frequency"),
 			GET_REAL (U"Adaptation factor"), GET_REAL (U"Maximum period"),
 			GET_REAL (U"Open phase"), GET_REAL (U"Collision phase"), GET_REAL (U"Power 1"), GET_REAL (U"Power 2"), GET_INTEGER (U"Hum"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4340,7 +4336,7 @@ DO
 		autoSound thee = PitchTier_to_Sound_pulseTrain (me, GET_REAL (U"Sampling frequency"),
 			GET_REAL (U"Adaptation factor"), GET_REAL (U"Adaptation time"),
 			GET_INTEGER (U"Interpolation depth"), GET_INTEGER (U"Hum"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4351,7 +4347,7 @@ DO
 	LOOP {
 		iam (PitchTier);
 		autoSound thee = PitchTier_to_Sound_sine (me, 0.0, 0.0, GET_REAL (U"Sampling frequency"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4380,7 +4376,7 @@ DIRECT2 (PitchTier_PointProcess_to_PitchTier) {
 	PitchTier pitch = FIRST (PitchTier);
 	PointProcess point = FIRST (PointProcess);
 	autoPitchTier thee = PitchTier_PointProcess_to_PitchTier (pitch, point);
-	praat_new (thee.transfer(), pitch -> name);
+	praat_new (thee.move(), pitch -> name);
 END2 }
 
 /***** POINTPROCESS *****/
@@ -4405,7 +4401,7 @@ DO
 	double tmin = GET_REAL (U"Start time"), tmax = GET_REAL (U"End time");
 	if (tmax < tmin) Melder_throw (U"End time (", tmax, U") should not be less than start time (", tmin, U").");
 	autoPointProcess me = PointProcess_create (tmin, tmax, 0);
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
 FORM (PointProcess_createPoissonProcess, U"Create Poisson process", U"Create Poisson process...") {
@@ -4419,17 +4415,17 @@ DO
 	if (tmax < tmin)
 		Melder_throw (U"End time (", tmax, U") should not be less than start time (", tmin, U").");
 	autoPointProcess me = PointProcess_createPoissonProcess (tmin, tmax, GET_REAL (U"Density"));
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
 DIRECT2 (PointProcess_difference) {
-	PointProcess point1 = NULL, point2 = NULL;
+	PointProcess point1 = nullptr, point2 = nullptr;
 	LOOP (point1 ? point2 : point1) = (PointProcess) OBJECT;
 	autoPointProcess thee = PointProcesses_difference (point1, point2);
-	praat_new (thee.transfer(), U"difference");
+	praat_new (thee.move(), U"difference");
 END2 }
 
-FORM (PointProcess_draw, U"PointProcess: Draw", 0) {
+FORM (PointProcess_draw, U"PointProcess: Draw", nullptr) {
 	praat_dia_timeRange (dia);
 	BOOLEAN (U"Garnish", 1)
 	OK2
@@ -4452,7 +4448,7 @@ DIRECT2 (PointProcess_edit) {
 	}
 END2 }
 
-FORM (PointProcess_fill, U"PointProcess: Fill", 0) {
+FORM (PointProcess_fill, U"PointProcess: Fill", nullptr) {
 	praat_dia_timeRange (dia);
 	POSITIVE (U"Period (s)", U"0.01")
 	OK2
@@ -4489,7 +4485,7 @@ FORM (PointProcess_getJitter_local, U"PointProcess: Get jitter (local)", U"Point
 DO
 	Melder_informationReal (PointProcess_getJitter_local (FIRST_ANY (PointProcess),
 		GET_REAL (U"left Time range"), GET_REAL (U"right Time range"),
-		GET_REAL (U"Shortest period"), GET_REAL (U"Longest period"), GET_REAL (U"Maximum period factor")), NULL);
+		GET_REAL (U"Shortest period"), GET_REAL (U"Longest period"), GET_REAL (U"Maximum period factor")), nullptr);
 END2 }
 
 FORM (PointProcess_getJitter_local_absolute, U"PointProcess: Get jitter (local, absolute)", U"PointProcess: Get jitter (local, absolute)...") {
@@ -4507,7 +4503,7 @@ FORM (PointProcess_getJitter_rap, U"PointProcess: Get jitter (rap)", U"PointProc
 DO
 	Melder_informationReal (PointProcess_getJitter_rap (FIRST_ANY (PointProcess),
 		GET_REAL (U"left Time range"), GET_REAL (U"right Time range"),
-		GET_REAL (U"Shortest period"), GET_REAL (U"Longest period"), GET_REAL (U"Maximum period factor")), NULL);
+		GET_REAL (U"Shortest period"), GET_REAL (U"Longest period"), GET_REAL (U"Maximum period factor")), nullptr);
 END2 }
 
 FORM (PointProcess_getJitter_ppq5, U"PointProcess: Get jitter (ppq5)", U"PointProcess: Get jitter (ppq5)...") {
@@ -4516,7 +4512,7 @@ FORM (PointProcess_getJitter_ppq5, U"PointProcess: Get jitter (ppq5)", U"PointPr
 DO
 	Melder_informationReal (PointProcess_getJitter_ppq5 (FIRST_ANY (PointProcess),
 		GET_REAL (U"left Time range"), GET_REAL (U"right Time range"),
-		GET_REAL (U"Shortest period"), GET_REAL (U"Longest period"), GET_REAL (U"Maximum period factor")), NULL);
+		GET_REAL (U"Shortest period"), GET_REAL (U"Longest period"), GET_REAL (U"Maximum period factor")), nullptr);
 END2 }
 
 FORM (PointProcess_getJitter_ddp, U"PointProcess: Get jitter (ddp)", U"PointProcess: Get jitter (ddp)...") {
@@ -4525,7 +4521,7 @@ FORM (PointProcess_getJitter_ddp, U"PointProcess: Get jitter (ddp)", U"PointProc
 DO
 	Melder_informationReal (PointProcess_getJitter_ddp (FIRST_ANY (PointProcess),
 		GET_REAL (U"left Time range"), GET_REAL (U"right Time range"),
-		GET_REAL (U"Shortest period"), GET_REAL (U"Longest period"), GET_REAL (U"Maximum period factor")), NULL);
+		GET_REAL (U"Shortest period"), GET_REAL (U"Longest period"), GET_REAL (U"Maximum period factor")), nullptr);
 END2 }
 
 FORM (PointProcess_getMeanPeriod, U"PointProcess: Get mean period", U"PointProcess: Get mean period...") {
@@ -4606,7 +4602,7 @@ DIRECT2 (PointProcess_intersection) {
 	PointProcess point1 = NULL, point2 = NULL;
 	LOOP (point1 ? point2 : point1) = (PointProcess) OBJECT;
 	autoPointProcess thee = PointProcesses_intersection (point1, point2);
-	praat_new (thee.transfer(), U"intersection");
+	praat_new (thee.move(), U"intersection");
 END2 }
 
 DIRECT2 (PointProcess_play) {
@@ -4666,7 +4662,7 @@ DIRECT2 (PointProcess_to_IntervalTier) {
 	LOOP {
 		iam (PointProcess);
 		autoIntervalTier thee = IntervalTier_create (my xmin, my xmax);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4674,7 +4670,7 @@ DIRECT2 (PointProcess_to_Matrix) {
 	LOOP {
 		iam (PointProcess);
 		autoMatrix thee = PointProcess_to_Matrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4685,7 +4681,7 @@ DO
 	LOOP {
 		iam (PointProcess);
 		autoPitchTier thee = PointProcess_to_PitchTier (me, GET_REAL (U"Maximum interval"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4697,7 +4693,7 @@ DO
 	LOOP {
 		iam (PointProcess);
 		autoTextGrid thee = TextGrid_create (my xmin, my xmax, GET_STRING (U"Tier names"), GET_STRING (U"Point tiers"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4709,7 +4705,7 @@ DO
 	LOOP {
 		iam (PointProcess);
 		autoTextGrid thee = PointProcess_to_TextGrid_vuv (me, GET_REAL (U"Maximum period"), GET_REAL (U"Mean period"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4717,7 +4713,7 @@ DIRECT2 (PointProcess_to_TextTier) {
 	LOOP {
 		iam (PointProcess);
 		autoTextTier thee = TextTier_create (my xmin, my xmax);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4736,7 +4732,7 @@ DO
 		autoSound thee = PointProcess_to_Sound_phonation (me, GET_REAL (U"Sampling frequency"),
 			GET_REAL (U"Adaptation factor"), GET_REAL (U"Maximum period"),
 			GET_REAL (U"Open phase"), GET_REAL (U"Collision phase"), GET_REAL (U"Power 1"), GET_REAL (U"Power 2"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4752,7 +4748,7 @@ DO
 		autoSound thee = PointProcess_to_Sound_pulseTrain (me, GET_REAL (U"Sampling frequency"),
 			GET_REAL (U"Adaptation factor"), GET_REAL (U"Adaptation time"),
 			GET_INTEGER (U"Interpolation depth"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4760,7 +4756,7 @@ DIRECT2 (PointProcess_to_Sound_hum) {
 	LOOP {
 		iam (PointProcess);
 		autoSound thee = PointProcess_to_Sound_hum (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4768,7 +4764,7 @@ DIRECT2 (PointProcess_union) {
 	PointProcess point1 = NULL, point2 = NULL;
 	LOOP (point1 ? point2 : point1) = (PointProcess) OBJECT;
 	autoPointProcess thee = PointProcesses_union (point1, point2);
-	praat_new (thee.transfer(), U"union");
+	praat_new (thee.move(), U"union");
 END2 }
 
 FORM (PointProcess_upto_IntensityTier, U"PointProcess: Up to IntensityTier", U"PointProcess: Up to IntensityTier...") {
@@ -4778,7 +4774,7 @@ DO
 	LOOP {
 		iam (PointProcess);
 		autoIntensityTier thee = PointProcess_upto_IntensityTier (me, GET_REAL (U"Intensity"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4789,7 +4785,7 @@ DO
 	LOOP {
 		iam (PointProcess);
 		autoPitchTier thee = PointProcess_upto_PitchTier (me, GET_REAL (U"Frequency"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4800,7 +4796,7 @@ DO
 	LOOP {
 		iam (PointProcess);
 		autoTextTier thee = PointProcess_upto_TextTier (me, GET_STRING (U"Text"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -4828,12 +4824,6 @@ END2 }
 
 /***** POINTPROCESS & SOUND *****/
 
-/*DIRECT (Sound_PointProcess_to_Manipulation)
-	Sound sound = ONLY (classSound);
-	PointProcess point = ONLY (classPointProcess);
-	if (! praat_new1 (Sound_PointProcess_to_Manipulation (sound, point), point -> name)) return 0;
-END*/
-
 DIRECT2 (Point_Sound_transplantDomain) {
 	PointProcess point = FIRST (PointProcess);
 	Sound sound = FIRST (Sound);
@@ -4935,14 +4925,14 @@ DO
 	autoAmplitudeTier thee = PointProcess_Sound_to_AmplitudeTier_period (point, sound,
 		GET_REAL (U"left Time range"), GET_REAL (U"right Time range"),
 		GET_REAL (U"Shortest period"), GET_REAL (U"Longest period"), GET_REAL (U"Maximum period factor"));
-	praat_new (thee.transfer(), sound -> name, U"_", point -> name);
+	praat_new (thee.move(), sound -> name, U"_", point -> name);
 END2 }
 
 DIRECT2 (PointProcess_Sound_to_AmplitudeTier_point) {
 	PointProcess point = FIRST (PointProcess);
 	Sound sound = FIRST (Sound);
 	autoAmplitudeTier thee = PointProcess_Sound_to_AmplitudeTier_point (point, sound);
-	praat_new (thee.transfer(), sound -> name, U"_", point -> name);
+	praat_new (thee.move(), sound -> name, U"_", point -> name);
 END2 }
 
 FORM (PointProcess_Sound_to_Ltas, U"PointProcess & Sound: To Ltas", 0) {
@@ -4958,7 +4948,7 @@ DO
 	autoLtas thee = PointProcess_Sound_to_Ltas (point, sound,
 		GET_REAL (U"Maximum frequency"), GET_REAL (U"Band width"),
 		GET_REAL (U"Shortest period"), GET_REAL (U"Longest period"), GET_REAL (U"Maximum period factor"));
-	praat_new (thee.transfer(), sound -> name);
+	praat_new (thee.move(), sound -> name);
 END2 }
 
 FORM (PointProcess_Sound_to_Ltas_harmonics, U"PointProcess & Sound: To Ltas (harmonics", 0) {
@@ -4973,7 +4963,7 @@ DO
 	autoLtas thee = PointProcess_Sound_to_Ltas_harmonics (point, sound,
 		GET_INTEGER (U"Maximum harmonic"),
 		GET_REAL (U"Shortest period"), GET_REAL (U"Longest period"), GET_REAL (U"Maximum period factor"));
-	praat_new (thee.transfer(), sound -> name);
+	praat_new (thee.move(), sound -> name);
 END2 }
 
 FORM (Sound_PointProcess_to_SoundEnsemble_correlate, U"Sound & PointProcess: To SoundEnsemble (correlate)", 0) {
@@ -4984,7 +4974,7 @@ DO
 	PointProcess point = FIRST (PointProcess);
 	Sound sound = FIRST (Sound);
 	autoSound thee = Sound_PointProcess_to_SoundEnsemble_correlate (sound, point, GET_REAL (U"From time"), GET_REAL (U"To time"));
-	praat_new (thee.transfer(), point -> name);
+	praat_new (thee.move(), point -> name);
 END2 }
 
 /***** POLYGON *****/
@@ -5109,7 +5099,7 @@ DIRECT2 (Polygon_to_Matrix) {
 	LOOP {
 		iam (Polygon);
 		autoMatrix thee = Polygon_to_Matrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5142,7 +5132,7 @@ FORM (Sound_Point_Pitch_Duration_to_Sound, U"To Sound", 0) {
 DO
 	autoSound thee = Sound_Point_Pitch_Duration_to_Sound (FIRST (Sound), FIRST (PointProcess),
 		FIRST (PitchTier), FIRST (DurationTier), GET_REAL (U"Longest period"));
-	praat_new (thee.transfer(), U"manip");
+	praat_new (thee.move(), U"manip");
 END2 }
 
 /***** SPECTROGRAM *****/
@@ -5220,7 +5210,7 @@ DIRECT2 (Spectrogram_to_Matrix) {
 	LOOP {
 		iam (Spectrogram);
 		autoMatrix thee = Spectrogram_to_Matrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5231,7 +5221,7 @@ DO
 	LOOP {
 		iam (Spectrogram);
 		autoSound thee = Spectrogram_to_Sound (me, GET_REAL (U"Sampling frequency"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5242,7 +5232,7 @@ DO
 	LOOP {
 		iam (Spectrogram);
 		autoSpectrum thee = Spectrogram_to_Spectrum (me, GET_REAL (U"Time"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5264,7 +5254,7 @@ DO
 	LOOP {
 		iam (Spectrum);
 		autoSpectrum thee = Spectrum_cepstralSmoothing (me, GET_REAL (U"Bandwidth"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5546,7 +5536,7 @@ DO
 	LOOP {
 		iam (Spectrum);
 		autoSpectrum thee = Spectrum_lpcSmoothing (me, GET_INTEGER (U"Number of peaks"), GET_REAL (U"Pre-emphasis from"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5583,7 +5573,7 @@ DO
 	LOOP {
 		iam (Spectrum);
 		autoExcitation thee = Spectrum_to_Excitation (me, GET_REAL (U"Frequency resolution"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5595,7 +5585,7 @@ DO
 	LOOP {
 		iam (Spectrum);
 		autoFormant thee = Spectrum_to_Formant (me, GET_INTEGER (U"Maximum number of formants"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5606,7 +5596,7 @@ DO
 	LOOP {
 		iam (Spectrum);
 		autoLtas thee = Spectrum_to_Ltas (me, GET_REAL (U"Bandwidth"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5614,7 +5604,7 @@ DIRECT2 (Spectrum_to_Ltas_1to1) {
 	LOOP {
 		iam (Spectrum);
 		autoLtas thee = Spectrum_to_Ltas_1to1 (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5622,7 +5612,7 @@ DIRECT2 (Spectrum_to_Matrix) {
 	LOOP {
 		iam (Spectrum);
 		autoMatrix thee = Spectrum_to_Matrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5630,7 +5620,7 @@ DIRECT2 (Spectrum_to_Sound) {
 	LOOP {
 		iam (Spectrum);
 		autoSound thee = Spectrum_to_Sound (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5638,7 +5628,7 @@ DIRECT2 (Spectrum_to_Spectrogram) {
 	LOOP {
 		iam (Spectrum);
 		autoSpectrogram thee = Spectrum_to_Spectrogram (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5646,7 +5636,7 @@ DIRECT2 (Spectrum_to_SpectrumTier_peaks) {
 	LOOP {
 		iam (Spectrum);
 		autoSpectrumTier thee = Spectrum_to_SpectrumTier_peaks (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5656,7 +5646,7 @@ DIRECT2 (SpectrumTier_downto_Table) {
 	LOOP {
 		iam (SpectrumTier);
 		autoTable thee = SpectrumTier_downto_Table (me, true, true, true);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5752,7 +5742,7 @@ if (! inited) {
 }
 DO
 	autoStrings me = Strings_createAsFileList (GET_STRING (U"path"));
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
 FORM (Strings_createAsDirectoryList, U"Create Strings as directory list", U"Create Strings as directory list...") {
@@ -5781,7 +5771,7 @@ if (! inited) {
 }
 DO
 	autoStrings me = Strings_createAsDirectoryList (GET_STRING (U"path"));
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
 DIRECT2 (Strings_edit) {
@@ -5871,7 +5861,7 @@ END2 }
 
 FORM_READ2 (Strings_readFromRawTextFile, U"Read Strings from raw text file", 0, true) {
 	autoStrings me = Strings_readFromRawTextFile (file);
-	praat_new (me.transfer(), MelderFile_name (file));
+	praat_new (me.move(), MelderFile_name (file));
 END2 }
 
 FORM (Strings_removeString, U"Strings: Remove string", 0) {
@@ -5899,7 +5889,7 @@ DO
 		iam (Strings);
 		autoStrings thee = Strings_change (me, GET_STRING (U"Find"), GET_STRING (U"Replace with"),
 			GET_INTEGER (U"Replace limit per string"), & numberOfMatches, & numberOfStringMatches, GET_INTEGER (U"Find and replace strings are") - 1);
-		praat_new (thee.transfer(), 0);
+		praat_new (thee.move());
 	}
 END2 }
 
@@ -5928,7 +5918,7 @@ DIRECT2 (Strings_to_Distributions) {
 	LOOP {
 		iam (Strings);
 		autoDistributions thee = Strings_to_Distributions (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5936,7 +5926,7 @@ DIRECT2 (Strings_to_WordList) {
 	LOOP {
 		iam (Strings);
 		autoWordList thee = Strings_to_WordList (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5953,7 +5943,7 @@ DIRECT2 (Table_to_Matrix) {
 	LOOP {
 		iam (Table);
 		autoMatrix thee = Table_to_Matrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -5971,14 +5961,14 @@ DO
 	double tmin = GET_REAL (U"Start time"), tmax = GET_REAL (U"End time");
 	if (tmax <= tmin) Melder_throw (U"End time should be greater than start time");
 	autoTextGrid thee = TextGrid_create (tmin, tmax, GET_STRING (U"All tier names"), GET_STRING (U"Which of these are point tiers?"));
-	praat_new (thee.transfer(), GET_STRING (U"All tier names"));
+	praat_new (thee.move(), GET_STRING (U"All tier names"));
 END2 }
 
 /***** TEXTTIER, rest in praat_TextGrid_init.cpp *****/
 
 FORM_READ2 (TextTier_readFromXwaves, U"Read TextTier from Xwaves", 0, true) {
 	autoTextTier me = TextTier_readFromXwaves (file);
-	praat_new (me.transfer(), MelderFile_name (file));
+	praat_new (me.move(), MelderFile_name (file));
 END2 }
 
 /***** TIMEFRAMESAMPLED *****/
@@ -6198,7 +6188,7 @@ DIRECT2 (Transition_conflate) {
 	LOOP {
 		iam (Transition);
 		autoDistributions thee = Transition_to_Distributions_conflate (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -6221,12 +6211,10 @@ END2 }
 DIRECT2 (Transition_eigen) {
 	LOOP {
 		iam (Transition);
-		Matrix vec_, val_;
-		Transition_eigen (me, & vec_, & val_);
-		autoMatrix vec = vec_;
-		autoMatrix val = val_;
-		praat_new (vec.transfer(), U"eigenvectors");
-		praat_new (val.transfer(), U"eigenvalues");
+		autoMatrix vectors, values;
+		Transition_eigen (me, & vectors, & values);
+		praat_new (vectors.move(), U"eigenvectors");
+		praat_new (values.move(), U"eigenvalues");
 	}
 END2 }
 
@@ -6241,7 +6229,7 @@ DO
 	LOOP {
 		iam (Transition);
 		autoTransition thee = Transition_power (me, GET_INTEGER (U"Power"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -6249,7 +6237,7 @@ DIRECT2 (Transition_to_Matrix) {
 	LOOP {
 		iam (Transition);
 		autoMatrix thee = Transition_to_Matrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -6279,6 +6267,7 @@ DIRECT (Acknowledgments) Melder_help (U"Acknowledgments"); END
 DIRECT (FormulasTutorial) Melder_help (U"Formulas"); END
 DIRECT (ScriptingTutorial) Melder_help (U"Scripting"); END
 DIRECT (DemoWindow) Melder_help (U"Demo window"); END
+DIRECT (Interoperability) Melder_help (U"Interoperability"); END
 DIRECT (Programming) Melder_help (U"Programming with Praat"); END
 DIRECT (SearchManual) Melder_search (); END
 
@@ -6467,6 +6456,7 @@ void praat_uvafon_init () {
 	praat_addMenuCommand (U"Objects", U"ApplicationHelp", U"Formulas tutorial", 0, 0, DO_FormulasTutorial);
 	praat_addMenuCommand (U"Objects", U"ApplicationHelp", U"Scripting tutorial", 0, 0, DO_ScriptingTutorial);
 	praat_addMenuCommand (U"Objects", U"ApplicationHelp", U"Demo window", 0, 0, DO_DemoWindow);
+	praat_addMenuCommand (U"Objects", U"ApplicationHelp", U"Interoperability", 0, 0, DO_Interoperability);
 	praat_addMenuCommand (U"Objects", U"ApplicationHelp", U"Programming", 0, 0, DO_Programming);
 	#ifdef macintosh
 		praat_addMenuCommand (U"Objects", U"Help", U"Praat Intro", 0, '?', DO_Intro);
diff --git a/fon/praat_Sound_init.cpp b/fon/praat_Sound_init.cpp
index 35f0923..0fc9820 100644
--- a/fon/praat_Sound_init.cpp
+++ b/fon/praat_Sound_init.cpp
@@ -64,7 +64,7 @@ DO
 	LOOP {
 		iam (LongSound);
 		autoSound thee = LongSound_extractPart (me, GET_REAL (U"left Time range"), GET_REAL (U"right Time range"), GET_INTEGER (U"Preserve times"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -75,7 +75,7 @@ DO
 	LOOP {
 		iam (LongSound);
 		double index = Sampled_xToIndex (me, GET_REAL (U"Time"));
-		Melder_informationReal (index, NULL);
+		Melder_informationReal (index, nullptr);
 	}
 END2 }
 
@@ -114,7 +114,7 @@ DIRECT2 (LongSound_help) { Melder_help (U"LongSound"); END2 }
 
 FORM_READ2 (LongSound_open, U"Open long sound file", nullptr, true) {
 	autoLongSound me = LongSound_open (file);
-	praat_new (me.transfer(), MelderFile_name (file));
+	praat_new (me.move(), MelderFile_name (file));
 END2 }
 
 FORM (LongSound_playPart, U"LongSound: Play part", nullptr) {
@@ -167,7 +167,7 @@ DO
 	LOOP {
 		iam (LongSound);
 		autoTextGrid thee = TextGrid_create (my xmin, my xmax, GET_STRING (U"Tier names"), GET_STRING (U"Point tiers"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -364,7 +364,7 @@ DO
 		autoSound thee = Sound_autoCorrelate (me,
 			GET_ENUM (kSounds_convolve_scaling, U"Amplitude scaling"),
 			GET_ENUM (kSounds_convolve_signalOutsideTimeDomain, U"Signal outside time domain is..."));
-		praat_new (thee.transfer(), U"ac_", my name);
+		praat_new (thee.move(), U"ac_", my name);
 	}
 END2 }
 
@@ -372,13 +372,13 @@ DIRECT2 (Sounds_combineToStereo) {
 	autoCollection set = praat_getSelectedObjects ();
 	autoSound result = Sounds_combineToStereo (set.peek());
 	long numberOfChannels = result -> ny;   // dereference before transferring
-	praat_new (result.transfer(), U"combined_", numberOfChannels);
+	praat_new (result.move(), U"combined_", numberOfChannels);
 END2 }
 
 DIRECT2 (Sounds_concatenate) {
 	autoCollection set = praat_getSelectedObjects ();
 	autoSound result = Sounds_concatenate_e (set.peek(), 0.0);
-	praat_new (result.transfer(), U"chain");
+	praat_new (result.move(), U"chain");
 END2 }
 
 FORM (Sounds_concatenateWithOverlap, U"Sounds: Concatenate with overlap", U"Sounds: Concatenate with overlap...") {
@@ -387,7 +387,7 @@ FORM (Sounds_concatenateWithOverlap, U"Sounds: Concatenate with overlap", U"Soun
 DO
 	autoCollection set = praat_getSelectedObjects ();
 	autoSound result = Sounds_concatenate_e (set.peek(), GET_REAL (U"Overlap"));
-	praat_new (result.transfer(), U"chain");
+	praat_new (result.move(), U"chain");
 END2 }
 
 DIRECT2 (Sounds_concatenateRecoverably) {
@@ -425,15 +425,15 @@ DIRECT2 (Sounds_concatenateRecoverably) {
 		nx += my nx;
 		tmin = tmax;
 	}
-	praat_new (thee.transfer(), U"chain");
-	praat_new (him.transfer(), U"chain");
+	praat_new (thee.move(), U"chain");
+	praat_new (him.move(), U"chain");
 END2 }
 
 DIRECT2 (Sound_convertToMono) {
 	LOOP {
 		iam (Sound);
 		autoSound thee = Sound_convertToMono (me);
-		praat_new (thee.transfer(), my name, U"_mono");
+		praat_new (thee.move(), my name, U"_mono");
 	}
 END2 }
 
@@ -441,19 +441,19 @@ DIRECT2 (Sound_convertToStereo) {
 	LOOP {
 		iam (Sound);
 		autoSound thee = Sound_convertToStereo (me);
-		praat_new (thee.transfer(), my name, U"_stereo");
+		praat_new (thee.move(), my name, U"_stereo");
 	}
 END2 }
 
 DIRECT2 (Sounds_convolve_old) {
-	Sound s1 = NULL, s2 = NULL;
+	Sound s1 = nullptr, s2 = nullptr;
 	LOOP {
 		iam (Sound);
 		( s1 ? s2 : s1 ) = me;
 	}
-	Melder_assert (s1 != NULL && s2 != NULL);
+	Melder_assert (s1 && s2);
 	autoSound thee = Sounds_convolve (s1, s2, kSounds_convolve_scaling_SUM, kSounds_convolve_signalOutsideTimeDomain_ZERO);
-	praat_new (thee.transfer(), s1 -> name, U"_", s2 -> name);
+	praat_new (thee.move(), s1 -> name, U"_", s2 -> name);
 END2 }
 
 FORM (Sounds_convolve, U"Sounds: Convolve", U"Sounds: Convolve...") {
@@ -461,16 +461,16 @@ FORM (Sounds_convolve, U"Sounds: Convolve", U"Sounds: Convolve...") {
 	RADIO_ENUM (U"Signal outside time domain is...", kSounds_convolve_signalOutsideTimeDomain, DEFAULT)
 	OK2
 DO
-	Sound s1 = NULL, s2 = NULL;
+	Sound s1 = nullptr, s2 = nullptr;
 	LOOP {
 		iam (Sound);
 		( s1 ? s2 : s1 ) = me;
 	}
-	Melder_assert (s1 != NULL && s2 != NULL);
+	Melder_assert (s1 && s2);
 	autoSound thee = Sounds_convolve (s1, s2,
 		GET_ENUM (kSounds_convolve_scaling, U"Amplitude scaling"),
 		GET_ENUM (kSounds_convolve_signalOutsideTimeDomain, U"Signal outside time domain is..."));
-	praat_new (thee.transfer(), s1 -> name, U"_", s2 -> name);
+	praat_new (thee.move(), s1 -> name, U"_", s2 -> name);
 END2 }
 
 static void common_Sound_create (UiForm dia, Interpreter interpreter, bool allowMultipleChannels) {
@@ -528,7 +528,7 @@ static void common_Sound_create (UiForm dia, Interpreter interpreter, bool allow
 		}
 	}
 	Matrix_formula ((Matrix) sound.peek(), GET_STRING (U"formula"), interpreter, NULL);
-	praat_new (sound.transfer(), GET_STRING (U"Name"));
+	praat_new (sound.move(), GET_STRING (U"Name"));
 	//praat_updateSelection ();
 }
 
@@ -572,7 +572,7 @@ DO
 	autoSound me = Sound_createAsPureTone (GET_INTEGER (U"Number of channels"), GET_REAL (U"Start time"), GET_REAL (U"End time"),
 		GET_REAL (U"Sampling frequency"), GET_REAL (U"Tone frequency"), GET_REAL (U"Amplitude"),
 		GET_REAL (U"Fade-in duration"), GET_REAL (U"Fade-out duration"));
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
 FORM (Sound_createFromToneComplex, U"Create Sound from tone complex", U"Create Sound from tone complex...") {
@@ -592,22 +592,22 @@ DO
 	autoSound me = Sound_createFromToneComplex (GET_REAL (U"Start time"), GET_REAL (U"End time"),
 		GET_REAL (U"Sampling frequency"), GET_INTEGER (U"Phase") - 1, GET_REAL (U"Frequency step"),
 		GET_REAL (U"First frequency"), GET_REAL (U"Ceiling"), GET_INTEGER (U"Number of components"));
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
-FORM (old_Sounds_crossCorrelate, U"Cross-correlate (short)", 0) {
+FORM (old_Sounds_crossCorrelate, U"Cross-correlate (short)", nullptr) {
 	REAL (U"From lag (s)", U"-0.1")
 	REAL (U"To lag (s)", U"0.1")
 	BOOLEAN (U"Normalize", 1)
 	OK2
 DO
-	Sound s1 = NULL, s2 = NULL;
+	Sound s1 = nullptr, s2 = nullptr;
 	LOOP {
 		iam (Sound);
 		( s1 ? s2 : s1 ) = me;
 	}
 	autoSound thee = Sounds_crossCorrelate_short (s1, s2, GET_REAL (U"From lag"), GET_REAL (U"To lag"), GET_INTEGER (U"Normalize"));
-	praat_new (thee.transfer(), U"cc_", s1 -> name, U"_", s2 -> name);
+	praat_new (thee.move(), U"cc_", s1 -> name, U"_", s2 -> name);
 END2 }
 
 FORM (Sounds_crossCorrelate, U"Sounds: Cross-correlate", U"Sounds: Cross-correlate...") {
@@ -615,16 +615,16 @@ FORM (Sounds_crossCorrelate, U"Sounds: Cross-correlate", U"Sounds: Cross-correla
 	RADIO_ENUM (U"Signal outside time domain is...", kSounds_convolve_signalOutsideTimeDomain, DEFAULT)
 	OK2
 DO_ALTERNATIVE (old_Sounds_crossCorrelate)
-	Sound s1 = NULL, s2 = NULL;
+	Sound s1 = nullptr, s2 = nullptr;
 	LOOP {
 		iam (Sound);
 		( s1 ? s2 : s1 ) = me;
 	}
-	Melder_assert (s1 != NULL && s2 != NULL);
+	Melder_assert (s1 && s2);
 	autoSound thee = Sounds_crossCorrelate (s1, s2,
 		GET_ENUM (kSounds_convolve_scaling, U"Amplitude scaling"),
 		GET_ENUM (kSounds_convolve_signalOutsideTimeDomain, U"Signal outside time domain is..."));
-	praat_new (thee.transfer(), s1 -> name, U"_", s2 -> name);
+	praat_new (thee.move(), s1 -> name, U"_", s2 -> name);
 END2 }
 
 FORM (Sound_deemphasizeInline, U"Sound: De-emphasize (in-line)", U"Sound: De-emphasize (in-line)...") {
@@ -653,7 +653,7 @@ DO
 		autoSound thee = Sound_deepenBandModulation (me, GET_REAL (U"Enhancement"),
 			GET_REAL (U"From frequency"), GET_REAL (U"To frequency"),
 			GET_REAL (U"Slow modulation"), GET_REAL (U"Fast modulation"), GET_REAL (U"Band smoothing"));
-		praat_new (thee.transfer(), my name, U"_", (long) (GET_REAL (U"Enhancement")));   // truncate number toward zero for visual effect
+		praat_new (thee.move(), my name, U"_", (long) (GET_REAL (U"Enhancement")));   // truncate number toward zero for visual effect
 	}
 END2 }
 
@@ -731,7 +731,7 @@ DIRECT2 (Sound_extractAllChannels) {
 		iam (Sound);
 		for (long channel = 1; channel <= my ny; channel ++) {
 			autoSound thee = Sound_extractChannel (me, channel);
-			praat_new (thee.transfer(), my name, U"_ch", channel);
+			praat_new (thee.move(), my name, U"_ch", channel);
 		}
 	}
 END2 }
@@ -744,7 +744,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoSound thee = Sound_extractChannel (me, channel);
-		praat_new (thee.transfer(), my name, U"_ch", channel);
+		praat_new (thee.move(), my name, U"_ch", channel);
 	}
 END2 }
 
@@ -752,7 +752,7 @@ DIRECT2 (Sound_extractLeftChannel) {
 	LOOP {
 		iam (Sound);
 		autoSound thee = Sound_extractChannel (me, 1);
-		praat_new (thee.transfer(), my name, U"_left");
+		praat_new (thee.move(), my name, U"_left");
 	}
 END2 }
 
@@ -770,7 +770,7 @@ DO
 			GET_REAL (U"left Time range"), GET_REAL (U"right Time range"),
 			GET_ENUM (kSound_windowShape, U"Window shape"), GET_REAL (U"Relative width"),
 			GET_INTEGER (U"Preserve times"));
-		praat_new (thee.transfer(), my name, U"_part");
+		praat_new (thee.move(), my name, U"_part");
 	}
 END2 }
 
@@ -785,7 +785,7 @@ DO
 		autoSound thee = Sound_extractPartForOverlap (me,
 			GET_REAL (U"left Time range"), GET_REAL (U"right Time range"),
 			GET_REAL (U"Overlap"));
-		praat_new (thee.transfer(), my name, U"_part");
+		praat_new (thee.move(), my name, U"_part");
 	}
 END2 }
 
@@ -793,7 +793,7 @@ DIRECT2 (Sound_extractRightChannel) {
 	LOOP {
 		iam (Sound);
 		autoSound thee = Sound_extractChannel (me, 2);
-		praat_new (thee.transfer(), my name, U"_right");
+		praat_new (thee.move(), my name, U"_right");
 	}
 END2 }
 
@@ -804,7 +804,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoSound thee = Sound_filter_deemphasis (me, GET_REAL (U"From frequency"));
-		praat_new (thee.transfer(), my name, U"_deemp");
+		praat_new (thee.move(), my name, U"_deemp");
 	}
 END2 }
 
@@ -816,7 +816,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoSound thee = Sound_filter_formula (me, GET_STRING (U"formula"), interpreter);
-		praat_new (thee.transfer(), my name, U"_filt");
+		praat_new (thee.move(), my name, U"_filt");
 	}
 END2 }
 
@@ -828,7 +828,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoSound thee = Sound_filter_oneFormant (me, GET_REAL (U"Frequency"), GET_REAL (U"Bandwidth"));
-		praat_new (thee.transfer(), my name, U"_filt");
+		praat_new (thee.move(), my name, U"_filt");
 	}
 END2 }
 
@@ -854,7 +854,7 @@ DO
 		iam (Sound);
 		autoSound thee = Sound_filter_passHannBand (me,
 			GET_REAL (U"From frequency"), GET_REAL (U"To frequency"), GET_REAL (U"Smoothing"));
-		praat_new (thee.transfer(), my name, U"_band");
+		praat_new (thee.move(), my name, U"_band");
 	}
 END2 }
 
@@ -865,7 +865,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoSound thee = Sound_filter_preemphasis (me, GET_REAL (U"From frequency"));
-		praat_new (thee.transfer(), my name, U"_preemp");
+		praat_new (thee.move(), my name, U"_preemp");
 	}
 END2 }
 
@@ -878,7 +878,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoSound thee = Sound_filter_stopHannBand (me, GET_REAL (U"From frequency"), GET_REAL (U"To frequency"), GET_REAL (U"Smoothing"));
-		praat_new (thee.transfer(), my name, U"_band");
+		praat_new (thee.move(), my name, U"_band");
 	}
 END2 }
 
@@ -895,7 +895,7 @@ DO
 	LOOP {
 		iam (Sound);
 		try {
-			Matrix_formula ((Matrix) me, GET_STRING (U"formula"), interpreter, NULL);
+			Matrix_formula (me, GET_STRING (U"formula"), interpreter, nullptr);
 			praat_dataChanged (me);
 		} catch (MelderError) {
 			praat_dataChanged (me);   // in case of error, the Sound may have partially changed
@@ -915,7 +915,7 @@ DO
 	LOOP {
 		iam (Sound);
 		try {
-			Matrix_formula_part ((Matrix) me,
+			Matrix_formula_part (me,
 				GET_REAL (U"From time"), GET_REAL (U"To time"),
 				GET_INTEGER (U"From channel") - 0.5, GET_INTEGER (U"To channel") + 0.5,
 				GET_STRING (U"formula"), interpreter, NULL);
@@ -1292,7 +1292,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoSound thee = Sound_lengthen_overlapAdd (me, minimumPitch, maximumPitch, factor);
-		praat_new (thee.transfer(), my name, U"_", Melder_fixed (factor, 2));
+		praat_new (thee.move(), my name, U"_", Melder_fixed (factor, 2));
 	}
 END2 }
 
@@ -1371,19 +1371,19 @@ FORM_READ2 (Sound_readSeparateChannelsFromSoundFile, U"Read separate channels fr
 	}
 	for (long ichan = 1; ichan <= sound -> ny; ichan ++) {
 		autoSound thee = Sound_extractChannel (sound.peek(), ichan);
-		praat_new (thee.transfer(), name, U"_ch", ichan);
+		praat_new (thee.move(), name, U"_ch", ichan);
 	}
 END2 }
 
 FORM_READ2 (Sound_readFromRawAlawFile, U"Read Sound from raw Alaw file", 0, true) {
 	autoSound me = Sound_readFromRawAlawFile (file);
-	praat_new (me.transfer(), MelderFile_name (file));
+	praat_new (me.move(), MelderFile_name (file));
 END2 }
 
-static SoundRecorder theSoundRecorder;   // only one at a time can exist
+static autoSoundRecorder theSoundRecorder;   // only one at a time can exist
 static int thePreviousNumberOfChannels;
-static void cb_SoundRecorder_destruction (Editor /* editor */, void* /* closure */) {
-	theSoundRecorder = nullptr;
+static void cb_SoundRecorder_pleaseReset (Editor /* editor */, void* /* closure */) {
+	theSoundRecorder. reset();
 }
 static void cb_SoundRecorder_publication (Editor /* editor */, void* /* closure */, Daata publication) {
 	try {
@@ -1396,20 +1396,14 @@ static void cb_SoundRecorder_publication (Editor /* editor */, void* /* closure
 static void do_Sound_record (int numberOfChannels) {
 	if (theCurrentPraatApplication -> batch)
 		Melder_throw (U"Cannot record a Sound from batch.");
-	if (theSoundRecorder) {
-		if (numberOfChannels == thePreviousNumberOfChannels) {
-			Editor_raise (theSoundRecorder);
-		} else {
-			forget (theSoundRecorder);
-		}
-	}
-	if (! theSoundRecorder) {
-		autoSoundRecorder soundRecorder = SoundRecorder_create (numberOfChannels);
-		theSoundRecorder = soundRecorder.transfer();   // YUCK; to a naked pointer, because it will be its own boss
-		Editor_setDestructionCallback (theSoundRecorder, cb_SoundRecorder_destruction, nullptr);
-		Editor_setPublicationCallback (theSoundRecorder, cb_SoundRecorder_publication, nullptr);
+	if (theSoundRecorder && numberOfChannels == thePreviousNumberOfChannels) {
+		Editor_raise (theSoundRecorder.get());
+	} else {
+		theSoundRecorder = SoundRecorder_create (numberOfChannels);
+		Editor_setPleaseResetCallback (theSoundRecorder.get(), cb_SoundRecorder_pleaseReset, nullptr);
+		Editor_setPublicationCallback (theSoundRecorder.get(), cb_SoundRecorder_publication, nullptr);
+		thePreviousNumberOfChannels = numberOfChannels;
 	}
-	thePreviousNumberOfChannels = numberOfChannels;
 }
 DIRECT2 (Sound_record_mono) {
 	do_Sound_record (1);
@@ -1449,7 +1443,7 @@ DO
 	autoSound me = Sound_recordFixedTime (GET_INTEGER (U"Input source"),
 		GET_REAL (U"Gain"), GET_REAL (U"Balance"),
 		Melder_atof (GET_STRING (U"Sampling frequency")), GET_REAL (U"Duration"));
-	praat_new (me.transfer(), U"untitled");
+	praat_new (me.move(), U"untitled");
 END2 }
 
 FORM (Sound_resample, U"Sound: Resample", U"Sound: Resample...") {
@@ -1461,7 +1455,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoSound thee = Sound_resample (me, samplingFrequency, GET_INTEGER (U"Precision"));
-		praat_new (thee.transfer(), my name, U"_", (long) round (samplingFrequency));
+		praat_new (thee.move(), my name, U"_", (long) round (samplingFrequency));
 	}
 END2 }
 
@@ -1494,7 +1488,7 @@ DO
 	}
 END2 }
 
-FORM (Sound_scaleIntensity, U"Sound: Scale intensity", U"Sound: Scale intensity") {
+FORM (Sound_scaleIntensity, U"Sound: Scale intensity", U"Sound: Scale intensity...") {
 	POSITIVE (U"New average intensity (dB SPL)", U"70.0")
 	OK2
 DO
@@ -1579,7 +1573,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoManipulation thee = Sound_to_Manipulation (me, GET_REAL (U"Time step"), fmin, fmax);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1594,7 +1588,7 @@ DO
 		iam (Sound);
 		autoCochleagram thee = Sound_to_Cochleagram (me, GET_REAL (U"Time step"),
 			GET_REAL (U"Frequency resolution"), GET_REAL (U"Window length"), GET_REAL (U"Forward-masking time"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1615,7 +1609,7 @@ DO
 			GET_REAL (U"Frequency resolution"), GET_INTEGER (U"Has synapse"),
 			GET_REAL (U"   replenishment rate"), GET_REAL (U"   loss rate"),
 			GET_REAL (U"   return rate"), GET_REAL (U"   reprocessing rate"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1632,7 +1626,7 @@ DO
 		autoFormant thee = Sound_to_Formant_burg (me, GET_REAL (U"Time step"),
 			GET_REAL (U"Max. number of formants"), GET_REAL (U"Maximum formant"),
 			GET_REAL (U"Window length"), GET_REAL (U"Pre-emphasis from"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1649,7 +1643,7 @@ DO
 		autoFormant thee = Sound_to_Formant_keepAll (me, GET_REAL (U"Time step"),
 			GET_REAL (U"Max. number of formants"), GET_REAL (U"Maximum formant"),
 			GET_REAL (U"Window length"), GET_REAL (U"Pre-emphasis from"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1666,7 +1660,7 @@ DO
 		autoFormant thee = Sound_to_Formant_willems (me, GET_REAL (U"Time step"),
 			GET_REAL (U"Number of formants"), GET_REAL (U"Maximum formant"),
 			GET_REAL (U"Window length"), GET_REAL (U"Pre-emphasis from"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1683,7 +1677,7 @@ DO
 		iam (Sound);
 		autoHarmonicity thee = Sound_to_Harmonicity_ac (me, GET_REAL (U"Time step"),
 			GET_REAL (U"Minimum pitch"), GET_REAL (U"Silence threshold"), periodsPerWindow);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1699,7 +1693,7 @@ DO
 		autoHarmonicity thee = Sound_to_Harmonicity_cc (me, GET_REAL (U"Time step"),
 			GET_REAL (U"Minimum pitch"), GET_REAL (U"Silence threshold"),
 			GET_REAL (U"Periods per window"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1715,7 +1709,7 @@ DO
 		autoMatrix thee = Sound_to_Harmonicity_GNE (me, GET_REAL (U"Minimum frequency"),
 			GET_REAL (U"Maximum frequency"), GET_REAL (U"Bandwidth"),
 			GET_REAL (U"Step"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1728,7 +1722,7 @@ DO
 		iam (Sound);
 		autoIntensity thee = Sound_to_Intensity (me,
 			GET_REAL (U"Minimum pitch"), GET_REAL (U"Time step"), false);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1742,7 +1736,7 @@ DO_ALTERNATIVE (old_Sound_to_Intensity)
 		iam (Sound);
 		autoIntensity thee = Sound_to_Intensity (me,
 			GET_REAL (U"Minimum pitch"), GET_REAL (U"Time step"), GET_INTEGER (U"Subtract mean"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1756,7 +1750,7 @@ DO
 		iam (Sound);
 		autoIntensityTier thee = Sound_to_IntensityTier (me,
 			GET_REAL (U"Minimum pitch"), GET_REAL (U"Time step"), GET_INTEGER (U"Subtract mean"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1764,7 +1758,7 @@ DIRECT2 (Sound_to_IntervalTier) {
 	LOOP {
 		iam (Sound);
 		autoIntervalTier thee = IntervalTier_create (my xmin, my xmax);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1775,7 +1769,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoLtas thee = Sound_to_Ltas (me, GET_REAL (U"Bandwidth"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1796,7 +1790,7 @@ DO
 		autoLtas thee = Sound_to_Ltas_pitchCorrected (me, fmin, fmax,
 			GET_REAL (U"Maximum frequency"), GET_REAL (U"Bandwidth"),
 			GET_REAL (U"Shortest period"), GET_REAL (U"Longest period"), GET_REAL (U"Maximum period factor"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1804,18 +1798,18 @@ DIRECT2 (Sound_to_Matrix) {
 	LOOP {
 		iam (Sound);
 		autoMatrix thee = Sound_to_Matrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
 DIRECT2 (Sounds_to_ParamCurve) {
-	Sound s1 = NULL, s2 = NULL;
+	Sound s1 = nullptr, s2 = nullptr;
 	LOOP {
 		iam (Sound);
 		( s1 ? s2 : s1 ) = me;
 	}
 	autoParamCurve thee = ParamCurve_create (s1, s2);
-	praat_new (thee.transfer(), s1 -> name, U"_", s2 -> name);
+	praat_new (thee.move(), s1 -> name, U"_", s2 -> name);
 END2 }
 
 FORM (Sound_to_Pitch, U"Sound: To Pitch", U"Sound: To Pitch...") {
@@ -1827,7 +1821,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoPitch thee = Sound_to_Pitch (me, GET_REAL (U"Time step"), GET_REAL (U"Pitch floor"), GET_REAL (U"Pitch ceiling"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1855,7 +1849,7 @@ DO
 			GET_REAL (U"Silence threshold"), GET_REAL (U"Voicing threshold"),
 			GET_REAL (U"Octave cost"), GET_REAL (U"Octave-jump cost"),
 			GET_REAL (U"Voiced / unvoiced cost"), GET_REAL (U"Pitch ceiling"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1883,7 +1877,7 @@ DO
 			GET_REAL (U"Silence threshold"), GET_REAL (U"Voicing threshold"),
 			GET_REAL (U"Octave cost"), GET_REAL (U"Octave-jump cost"),
 			GET_REAL (U"Voiced / unvoiced cost"), GET_REAL (U"Pitch ceiling"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1904,7 +1898,7 @@ DO
 		iam (Sound);
 		autoPointProcess thee = Sound_to_PointProcess_extrema (me, channel > my ny ? 1 : channel, GET_INTEGER (U"Interpolation") - 1,
 			GET_INTEGER (U"Include maxima"), GET_INTEGER (U"Include minima"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1918,7 +1912,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoPointProcess thee = Sound_to_PointProcess_periodic_cc (me, fmin, fmax);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1934,7 +1928,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoPointProcess thee = Sound_to_PointProcess_periodic_peaks (me, fmin, fmax, GET_INTEGER (U"Include maxima"), GET_INTEGER (U"Include minima"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1948,7 +1942,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoPointProcess thee = Sound_to_PointProcess_zeroes (me, channel > my ny ? 1 : channel, GET_INTEGER (U"Include raisers"), GET_INTEGER (U"Include fallers"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1965,7 +1959,7 @@ DO
 		autoSpectrogram thee = Sound_to_Spectrogram (me, GET_REAL (U"Window length"),
 			GET_REAL (U"Maximum frequency"), GET_REAL (U"Time step"),
 			GET_REAL (U"Frequency step"), GET_ENUM (kSound_to_Spectrogram_windowShape, U"Window shape"), 8.0, 8.0);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1976,7 +1970,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoSpectrum thee = Sound_to_Spectrum (me, GET_INTEGER (U"Fast"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1984,7 +1978,7 @@ DIRECT2 (Sound_to_Spectrum_dft) {
 	LOOP {
 		iam (Sound);
 		autoSpectrum thee = Sound_to_Spectrum (me, false);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1992,7 +1986,7 @@ DIRECT2 (Sound_to_Spectrum_fft) {
 	LOOP {
 		iam (Sound);
 		autoSpectrum thee = Sound_to_Spectrum (me, true);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2004,7 +1998,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoTextGrid thee = TextGrid_create (my xmin, my xmax, GET_STRING (U"All tier names"), GET_STRING (U"Which of these are point tiers?"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -2012,7 +2006,7 @@ DIRECT2 (Sound_to_TextTier) {
 	LOOP {
 		iam (Sound);
 		autoTextTier thee = TextTier_create (my xmin, my xmax);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
diff --git a/fon/praat_TextGrid_init.cpp b/fon/praat_TextGrid_init.cpp
index eb06f4d..cddb71b 100644
--- a/fon/praat_TextGrid_init.cpp
+++ b/fon/praat_TextGrid_init.cpp
@@ -50,7 +50,7 @@ DIRECT2 (AnyTier_into_TextGrid) {
 		iam (AnyTier);
 		TextGrid_addTier_copy (grid.peek(), me);
 	}
-	praat_new (grid.transfer(), U"grid");
+	praat_new (grid.move(), U"grid");
 END2 }
 
 /***** INTERVALTIER *****/
@@ -62,7 +62,7 @@ DO
 	LOOP {
 		iam (IntervalTier);
 		autoTableOfReal thee = IntervalTier_downto_TableOfReal (me, GET_STRING (U"Label"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -70,7 +70,7 @@ DIRECT2 (IntervalTier_downto_TableOfReal_any) {
 	LOOP {
 		iam (IntervalTier);
 		autoTableOfReal thee = IntervalTier_downto_TableOfReal_any (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -81,7 +81,7 @@ DO
 	LOOP {
 		iam (IntervalTier);
 		autoPointProcess thee = IntervalTier_getCentrePoints (me, GET_STRING (U"Text"));
-		praat_new (thee.transfer(), GET_STRING (U"Text"));
+		praat_new (thee.move(), GET_STRING (U"Text"));
 	}
 END2 }
 
@@ -92,7 +92,7 @@ DO
 	LOOP {
 		iam (IntervalTier);
 		autoPointProcess thee = IntervalTier_getEndPoints (me, GET_STRING (U"Text"));
-		praat_new (thee.transfer(), GET_STRING (U"Text"));
+		praat_new (thee.move(), GET_STRING (U"Text"));
 	}
 END2 }
 
@@ -103,7 +103,7 @@ DO
 	LOOP {
 		iam (IntervalTier);
 		autoPointProcess thee = IntervalTier_getStartingPoints (me, GET_STRING (U"Text"));
-		praat_new (thee.transfer(), GET_STRING (U"Text"));
+		praat_new (thee.move(), GET_STRING (U"Text"));
 	}
 END2 }
 
@@ -124,43 +124,43 @@ FORM (IntervalTier_PointProcess_endToCentre, U"From end to centre", U"IntervalTi
 	REAL (U"Phase (0-1)", U"0.5")
 	OK2
 DO
-	IntervalTier tier = NULL;
-	PointProcess point = NULL;
+	IntervalTier tier = nullptr;
+	PointProcess point = nullptr;
 	LOOP {
 		if (CLASS == classIntervalTier) tier = (IntervalTier) OBJECT;
 		if (CLASS == classPointProcess) point = (PointProcess) OBJECT;
 	}
 	double phase = GET_REAL (U"Phase");
 	autoPointProcess thee = IntervalTier_PointProcess_endToCentre (tier, point, phase);
-	praat_new (thee.transfer(), tier -> name, U"_", point -> name, U"_", lround (100.0 * phase));
+	praat_new (thee.move(), tier -> name, U"_", point -> name, U"_", lround (100.0 * phase));
 END2 }
 
 FORM (IntervalTier_PointProcess_startToCentre, U"From start to centre", U"IntervalTier & PointProcess: Start to centre...") {
 	REAL (U"Phase (0-1)", U"0.5")
 	OK2
 DO
-	IntervalTier tier = NULL;
-	PointProcess point = NULL;
+	IntervalTier tier = nullptr;
+	PointProcess point = nullptr;
 	LOOP {
 		if (CLASS == classIntervalTier) tier = (IntervalTier) OBJECT;
 		if (CLASS == classPointProcess) point = (PointProcess) OBJECT;
 	}
 	double phase = GET_REAL (U"Phase");
 	autoPointProcess thee = IntervalTier_PointProcess_startToCentre (tier, point, phase);
-	praat_new (thee.transfer(), tier -> name, U"_", point -> name, U"_", lround (100.0 * phase));
+	praat_new (thee.move(), tier -> name, U"_", point -> name, U"_", lround (100.0 * phase));
 END2 }
 
 /***** LABEL (obsolete) *****/
 
 DIRECT2 (Label_Sound_to_TextGrid) {
-	Label label = NULL;
-	Sound sound = NULL;
+	Label label = nullptr;
+	Sound sound = nullptr;
 	LOOP {
 		if (CLASS == classLabel) label = (Label) OBJECT;
 		if (CLASS == classSound) sound = (Sound) OBJECT;
 	}
 	autoTextGrid thee = Label_Function_to_TextGrid (label, sound);
-	praat_new (thee.transfer(), sound -> name);
+	praat_new (thee.move(), sound -> name);
 END2 }
 
 DIRECT2 (info_Label_Sound_to_TextGrid) {
@@ -171,8 +171,8 @@ END2 }
 /***** PITCH & TEXTGRID *****/
 
 static void pr_TextGrid_Pitch_draw (UiForm dia, int speckle, int unit) {
-	TextGrid grid = NULL;
-	Pitch pitch = NULL;
+	TextGrid grid = nullptr;
+	Pitch pitch = nullptr;
 	int IOBJECT;
 	LOOP {
 		if (CLASS == classTextGrid) grid = (TextGrid) OBJECT;
@@ -187,80 +187,80 @@ static void pr_TextGrid_Pitch_draw (UiForm dia, int speckle, int unit) {
 		GET_INTEGER (U"Use text styles"), GET_INTEGER (U"Text alignment") - 1, GET_INTEGER (U"Garnish"), speckle, unit);
 }
 
-FORM (TextGrid_Pitch_draw, U"TextGrid & Pitch: Draw", 0) {
+FORM (TextGrid_Pitch_draw, U"TextGrid & Pitch: Draw", nullptr) {
 	INTEGER (STRING_TIER_NUMBER, U"1")
 	praat_dia_timeRange (dia);
 	REAL (STRING_FROM_FREQUENCY_HZ, U"0.0")
 	POSITIVE (STRING_TO_FREQUENCY_HZ, U"500.0")
 	INTEGER (U"Font size (points)", U"18")
-	BOOLEAN (U"Use text styles", 1)
+	BOOLEAN (U"Use text styles", true)
 	OPTIONMENU (U"Text alignment", 2) OPTION (U"Left") OPTION (U"Centre") OPTION (U"Right")
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_draw (dia, Pitch_speckle_NO, kPitch_unit_HERTZ);
 END2 }
 
-FORM (TextGrid_Pitch_drawErb, U"TextGrid & Pitch: Draw erb", 0) {
+FORM (TextGrid_Pitch_drawErb, U"TextGrid & Pitch: Draw erb", nullptr) {
 	INTEGER (STRING_TIER_NUMBER, U"1")
 	praat_dia_timeRange (dia);
 	REAL (U"left Frequency range (ERB)", U"0")
 	REAL (U"right Frequency range (ERB)", U"10.0")
 	INTEGER (U"Font size (points)", U"18")
-	BOOLEAN (U"Use text styles", 1)
+	BOOLEAN (U"Use text styles", true)
 	OPTIONMENU (U"Text alignment", 2) OPTION (U"Left") OPTION (U"Centre") OPTION (U"Right")
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_draw (dia, Pitch_speckle_NO, kPitch_unit_ERB);
 END2 }
 
-FORM (TextGrid_Pitch_drawLogarithmic, U"TextGrid & Pitch: Draw logarithmic", 0) {
+FORM (TextGrid_Pitch_drawLogarithmic, U"TextGrid & Pitch: Draw logarithmic", nullptr) {
 	INTEGER (STRING_TIER_NUMBER, U"1")
 	praat_dia_timeRange (dia);
 	POSITIVE (STRING_FROM_FREQUENCY_HZ, U"50.0")
 	POSITIVE (STRING_TO_FREQUENCY_HZ, U"500.0")
 	INTEGER (U"Font size (points)", U"18")
-	BOOLEAN (U"Use text styles", 1)
+	BOOLEAN (U"Use text styles", true)
 	OPTIONMENU (U"Text alignment", 2) OPTION (U"Left") OPTION (U"Centre") OPTION (U"Right")
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_draw (dia, Pitch_speckle_NO, kPitch_unit_HERTZ_LOGARITHMIC);
 END2 }
 
-FORM (TextGrid_Pitch_drawMel, U"TextGrid & Pitch: Draw mel", 0) {
+FORM (TextGrid_Pitch_drawMel, U"TextGrid & Pitch: Draw mel", nullptr) {
 	INTEGER (STRING_TIER_NUMBER, U"1")
 	praat_dia_timeRange (dia);
 	REAL (U"left Frequency range (mel)", U"0")
 	REAL (U"right Frequency range (mel)", U"500")
 	INTEGER (U"Font size (points)", U"18")
-	BOOLEAN (U"Use text styles", 1)
+	BOOLEAN (U"Use text styles", true)
 	OPTIONMENU (U"Text alignment", 2) OPTION (U"Left") OPTION (U"Centre") OPTION (U"Right")
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_draw (dia, Pitch_speckle_NO, kPitch_unit_MEL);
 END2 }
 
-FORM (TextGrid_Pitch_drawSemitones, U"TextGrid & Pitch: Draw semitones", 0) {
+FORM (TextGrid_Pitch_drawSemitones, U"TextGrid & Pitch: Draw semitones", nullptr) {
 	INTEGER (STRING_TIER_NUMBER, U"1")
 	praat_dia_timeRange (dia);
 	LABEL (U"", U"Range in semitones re 100 hertz:")
 	REAL (U"left Frequency range (st)", U"-12.0")
 	REAL (U"right Frequency range (st)", U"30.0")
 	INTEGER (U"Font size (points)", U"18")
-	BOOLEAN (U"Use text styles", 1)
+	BOOLEAN (U"Use text styles", true)
 	OPTIONMENU (U"Text alignment", 2) OPTION (U"Left") OPTION (U"Centre") OPTION (U"Right")
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_draw (dia, Pitch_speckle_NO, kPitch_unit_SEMITONES_100);
 END2 }
 
 static void pr_TextGrid_Pitch_drawSeparately (UiForm dia, int speckle, int unit) {
-	TextGrid grid = NULL;
-	Pitch pitch = NULL;
+	TextGrid grid = nullptr;
+	Pitch pitch = nullptr;
 	int IOBJECT;
 	LOOP {
 		if (CLASS == classTextGrid) grid = (TextGrid) OBJECT;
@@ -275,194 +275,194 @@ static void pr_TextGrid_Pitch_drawSeparately (UiForm dia, int speckle, int unit)
 		GET_INTEGER (U"Use text styles"), GET_INTEGER (U"Garnish"), speckle, unit);
 }
 
-FORM (TextGrid_Pitch_drawSeparately, U"TextGrid & Pitch: Draw separately", 0) {
+FORM (TextGrid_Pitch_drawSeparately, U"TextGrid & Pitch: Draw separately", nullptr) {
 	praat_dia_timeRange (dia);
 	REAL (STRING_FROM_FREQUENCY_HZ, U"0.0")
 	REAL (STRING_TO_FREQUENCY_HZ, U"500.0")
-	BOOLEAN (U"Show boundaries", 1)
-	BOOLEAN (U"Use text styles", 1)
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Show boundaries", true)
+	BOOLEAN (U"Use text styles", true)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_drawSeparately (dia, Pitch_speckle_NO, kPitch_unit_HERTZ);
 END2 }
 
-FORM (TextGrid_Pitch_drawSeparatelyErb, U"TextGrid & Pitch: Draw separately erb", 0) {
+FORM (TextGrid_Pitch_drawSeparatelyErb, U"TextGrid & Pitch: Draw separately erb", nullptr) {
 	praat_dia_timeRange (dia);
 	REAL (U"left Frequency range (ERB)", U"0")
 	REAL (U"right Frequency range (ERB)", U"10.0")
-	BOOLEAN (U"Show boundaries", 1)
-	BOOLEAN (U"Use text styles", 1)
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Show boundaries", true)
+	BOOLEAN (U"Use text styles", true)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_drawSeparately (dia, Pitch_speckle_NO, kPitch_unit_ERB);
 END2 }
 
-FORM (TextGrid_Pitch_drawSeparatelyLogarithmic, U"TextGrid & Pitch: Draw separately logarithmic", 0) {
+FORM (TextGrid_Pitch_drawSeparatelyLogarithmic, U"TextGrid & Pitch: Draw separately logarithmic", nullptr) {
 	praat_dia_timeRange (dia);
 	POSITIVE (STRING_FROM_FREQUENCY_HZ, U"50.0")
 	POSITIVE (STRING_TO_FREQUENCY_HZ, U"500.0")
-	BOOLEAN (U"Show boundaries", 1)
-	BOOLEAN (U"Use text styles", 1)
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Show boundaries", true)
+	BOOLEAN (U"Use text styles", true)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_drawSeparately (dia, Pitch_speckle_NO, kPitch_unit_HERTZ_LOGARITHMIC);
 END2 }
 
-FORM (TextGrid_Pitch_drawSeparatelyMel, U"TextGrid & Pitch: Draw separately mel", 0) {
+FORM (TextGrid_Pitch_drawSeparatelyMel, U"TextGrid & Pitch: Draw separately mel", nullptr) {
 	praat_dia_timeRange (dia);
 	REAL (U"left Frequency range (mel)", U"0")
 	REAL (U"right Frequency range (mel)", U"500")
-	BOOLEAN (U"Show boundaries", 1)
-	BOOLEAN (U"Use text styles", 1)
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Show boundaries", true)
+	BOOLEAN (U"Use text styles", true)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_drawSeparately (dia, Pitch_speckle_NO, kPitch_unit_MEL);
 END2 }
 
-FORM (TextGrid_Pitch_drawSeparatelySemitones, U"TextGrid & Pitch: Draw separately semitones", 0) {
+FORM (TextGrid_Pitch_drawSeparatelySemitones, U"TextGrid & Pitch: Draw separately semitones", nullptr) {
 	praat_dia_timeRange (dia);
 	LABEL (U"", U"Range in semitones re 100 hertz:")
 	REAL (U"left Frequency range (st)", U"-12.0")
 	REAL (U"right Frequency range (st)", U"30.0")
-	BOOLEAN (U"Show boundaries", 1)
-	BOOLEAN (U"Use text styles", 1)
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Show boundaries", true)
+	BOOLEAN (U"Use text styles", true)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_drawSeparately (dia, Pitch_speckle_NO, kPitch_unit_SEMITONES_100);
 END2 }
 
-FORM (TextGrid_Pitch_speckle, U"TextGrid & Pitch: Speckle", 0) {
+FORM (TextGrid_Pitch_speckle, U"TextGrid & Pitch: Speckle", nullptr) {
 	INTEGER (STRING_TIER_NUMBER, U"1")
 	praat_dia_timeRange (dia);
 	REAL (STRING_FROM_FREQUENCY_HZ, U"0.0")
 	POSITIVE (STRING_TO_FREQUENCY_HZ, U"500.0")
 	INTEGER (U"Font size (points)", U"18")
-	BOOLEAN (U"Use text styles", 1)
+	BOOLEAN (U"Use text styles", true)
 	OPTIONMENU (U"Text alignment", 2) OPTION (U"Left") OPTION (U"Centre") OPTION (U"Right")
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_draw (dia, Pitch_speckle_YES, kPitch_unit_HERTZ);
 END2 }
 
-FORM (TextGrid_Pitch_speckleErb, U"TextGrid & Pitch: Speckle erb", 0) {
+FORM (TextGrid_Pitch_speckleErb, U"TextGrid & Pitch: Speckle erb", nullptr) {
 	INTEGER (STRING_TIER_NUMBER, U"1")
 	praat_dia_timeRange (dia);
 	REAL (U"left Frequency range (ERB)", U"0")
 	REAL (U"right Frequency range (ERB)", U"10.0")
 	INTEGER (U"Font size (points)", U"18")
-	BOOLEAN (U"Use text styles", 1)
+	BOOLEAN (U"Use text styles", true)
 	OPTIONMENU (U"Text alignment", 2) OPTION (U"Left") OPTION (U"Centre") OPTION (U"Right")
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_draw (dia, Pitch_speckle_YES, kPitch_unit_ERB);
 END2 }
 
-FORM (TextGrid_Pitch_speckleLogarithmic, U"TextGrid & Pitch: Speckle logarithmic", 0) {
+FORM (TextGrid_Pitch_speckleLogarithmic, U"TextGrid & Pitch: Speckle logarithmic", nullptr) {
 	INTEGER (STRING_TIER_NUMBER, U"1")
 	praat_dia_timeRange (dia);
 	POSITIVE (STRING_FROM_FREQUENCY_HZ, U"50.0")
 	POSITIVE (STRING_TO_FREQUENCY_HZ, U"500.0")
 	INTEGER (U"Font size (points)", U"18")
-	BOOLEAN (U"Use text styles", 1)
+	BOOLEAN (U"Use text styles", true)
 	OPTIONMENU (U"Text alignment", 2) OPTION (U"Left") OPTION (U"Centre") OPTION (U"Right")
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_draw (dia, Pitch_speckle_YES, kPitch_unit_HERTZ_LOGARITHMIC);
 END2 }
 
-FORM (TextGrid_Pitch_speckleMel, U"TextGrid & Pitch: Speckle mel", 0) {
+FORM (TextGrid_Pitch_speckleMel, U"TextGrid & Pitch: Speckle mel", nullptr) {
 	INTEGER (STRING_TIER_NUMBER, U"1")
 	praat_dia_timeRange (dia);
 	REAL (U"left Frequency range (mel)", U"0")
 	REAL (U"right Frequency range (mel)", U"500")
 	INTEGER (U"Font size (points)", U"18")
-	BOOLEAN (U"Use text styles", 1)
+	BOOLEAN (U"Use text styles", true)
 	OPTIONMENU (U"Text alignment", 2) OPTION (U"Left") OPTION (U"Centre") OPTION (U"Right")
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_draw (dia, Pitch_speckle_YES, kPitch_unit_MEL);
 END2 }
 
-FORM (TextGrid_Pitch_speckleSemitones, U"TextGrid & Pitch: Speckle semitones", 0) {
+FORM (TextGrid_Pitch_speckleSemitones, U"TextGrid & Pitch: Speckle semitones", nullptr) {
 	INTEGER (STRING_TIER_NUMBER, U"1")
 	praat_dia_timeRange (dia);
 	LABEL (U"", U"Range in semitones re 100 hertz:")
 	REAL (U"left Frequency range (st)", U"-12.0")
 	REAL (U"right Frequency range (st)", U"30.0")
 	INTEGER (U"Font size (points)", U"18")
-	BOOLEAN (U"Use text styles", 1)
+	BOOLEAN (U"Use text styles", true)
 	OPTIONMENU (U"Text alignment", 2) OPTION (U"Left") OPTION (U"Centre") OPTION (U"Right")
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_draw (dia, Pitch_speckle_YES, kPitch_unit_SEMITONES_100);
 END2 }
 
-FORM (TextGrid_Pitch_speckleSeparately, U"TextGrid & Pitch: Speckle separately", 0) {
+FORM (TextGrid_Pitch_speckleSeparately, U"TextGrid & Pitch: Speckle separately", nullptr) {
 	praat_dia_timeRange (dia);
 	REAL (STRING_FROM_FREQUENCY_HZ, U"0.0")
 	REAL (STRING_TO_FREQUENCY_HZ, U"500.0")
-	BOOLEAN (U"Show boundaries", 1)
-	BOOLEAN (U"Use text styles", 1)
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Show boundaries", true)
+	BOOLEAN (U"Use text styles", true)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_drawSeparately (dia, Pitch_speckle_YES, kPitch_unit_HERTZ);
 END2 }
 
-FORM (TextGrid_Pitch_speckleSeparatelyErb, U"TextGrid & Pitch: Speckle separately erb", 0) {
+FORM (TextGrid_Pitch_speckleSeparatelyErb, U"TextGrid & Pitch: Speckle separately erb", nullptr) {
 	praat_dia_timeRange (dia);
 	REAL (U"left Frequency range (ERB)", U"0")
 	REAL (U"right Frequency range (ERB)", U"10.0")
-	BOOLEAN (U"Show boundaries", 1)
-	BOOLEAN (U"Use text styles", 1)
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Show boundaries", true)
+	BOOLEAN (U"Use text styles", true)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_drawSeparately (dia, Pitch_speckle_YES, kPitch_unit_ERB);
 END2 }
 
-FORM (TextGrid_Pitch_speckleSeparatelyLogarithmic, U"TextGrid & Pitch: Speckle separately logarithmic", 0) {
+FORM (TextGrid_Pitch_speckleSeparatelyLogarithmic, U"TextGrid & Pitch: Speckle separately logarithmic", nullptr) {
 	praat_dia_timeRange (dia);
 	POSITIVE (STRING_FROM_FREQUENCY_HZ, U"50.0")
 	POSITIVE (STRING_TO_FREQUENCY_HZ, U"500.0")
-	BOOLEAN (U"Show boundaries", 1)
-	BOOLEAN (U"Use text styles", 1)
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Show boundaries", true)
+	BOOLEAN (U"Use text styles", true)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_drawSeparately (dia, Pitch_speckle_YES, kPitch_unit_HERTZ_LOGARITHMIC);
 END2 }
 
-FORM (TextGrid_Pitch_speckleSeparatelyMel, U"TextGrid & Pitch: Speckle separately mel", 0) {
+FORM (TextGrid_Pitch_speckleSeparatelyMel, U"TextGrid & Pitch: Speckle separately mel", nullptr) {
 	praat_dia_timeRange (dia);
 	REAL (U"left Frequency range (mel)", U"0")
 	REAL (U"right Frequency range (mel)", U"500")
-	BOOLEAN (U"Show boundaries", 1)
-	BOOLEAN (U"Use text styles", 1)
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Show boundaries", true)
+	BOOLEAN (U"Use text styles", true)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_drawSeparately (dia, Pitch_speckle_YES, kPitch_unit_MEL);
 END2 }
 
-FORM (TextGrid_Pitch_speckleSeparatelySemitones, U"TextGrid & Pitch: Speckle separately semitones", 0) {
+FORM (TextGrid_Pitch_speckleSeparatelySemitones, U"TextGrid & Pitch: Speckle separately semitones", nullptr) {
 	praat_dia_timeRange (dia);
 	LABEL (U"", U"Range in semitones re 100 hertz:")
 	REAL (U"left Frequency range (st)", U"-12.0")
 	REAL (U"right Frequency range (st)", U"30.0")
-	BOOLEAN (U"Show boundaries", 1)
-	BOOLEAN (U"Use text styles", 1)
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Show boundaries", true)
+	BOOLEAN (U"Use text styles", true)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	pr_TextGrid_Pitch_drawSeparately (dia, Pitch_speckle_YES, kPitch_unit_SEMITONES_100);
@@ -477,28 +477,28 @@ FORM (Pitch_TextTier_to_PitchTier, U"Pitch & TextTier to PitchTier", U"Pitch & T
 		RADIOBUTTON (U"Interpolate")
 	OK2
 DO
-	Pitch pitch = NULL;
-	TextTier tier = NULL;
+	Pitch pitch = nullptr;
+	TextTier tier = nullptr;
 	LOOP {
 		iam (Daata);
 		if (CLASS == classPitch) pitch = (Pitch) me;
 		if (CLASS == classTextTier) tier = (TextTier) me;
 	}
 	autoPitchTier thee = Pitch_AnyTier_to_PitchTier (pitch, (AnyTier) tier, GET_INTEGER (U"Unvoiced strategy") - 1);
-	praat_new (thee.transfer(), pitch -> name);
+	praat_new (thee.move(), pitch -> name);
 END2 }
 
 /***** SOUND & TEXTGRID *****/
 
-FORM (TextGrid_Sound_draw, U"TextGrid & Sound: Draw...", 0) {
+FORM (TextGrid_Sound_draw, U"TextGrid & Sound: Draw...", nullptr) {
 	praat_dia_timeRange (dia);
-	BOOLEAN (U"Show boundaries", 1)
-	BOOLEAN (U"Use text styles", 1)
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Show boundaries", true)
+	BOOLEAN (U"Use text styles", true)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
-	TextGrid textgrid = NULL;
-	Sound sound = NULL;
+	TextGrid textgrid = nullptr;
+	Sound sound = nullptr;
 	LOOP {
 		if (CLASS == classTextGrid) textgrid = (TextGrid) OBJECT;
 		if (CLASS == classSound) sound = (Sound) OBJECT;
@@ -509,46 +509,46 @@ DO
 		GET_INTEGER (U"Use text styles"), GET_INTEGER (U"Garnish"));
 END2 }
 
-FORM (TextGrid_Sound_extractAllIntervals, U"TextGrid & Sound: Extract all intervals", 0) {
+FORM (TextGrid_Sound_extractAllIntervals, U"TextGrid & Sound: Extract all intervals", nullptr) {
 	INTEGER (STRING_TIER_NUMBER, U"1")
-	BOOLEAN (U"Preserve times", 0)
+	BOOLEAN (U"Preserve times", false)
 	OK2
 DO
-	TextGrid textgrid = NULL;
-	Sound sound = NULL;
+	TextGrid textgrid = nullptr;
+	Sound sound = nullptr;
 	LOOP {
 		if (CLASS == classTextGrid) textgrid = (TextGrid) OBJECT;
 		if (CLASS == classSound) sound = (Sound) OBJECT;
 	}
 	autoCollection thee = TextGrid_Sound_extractAllIntervals (textgrid, sound,
 		GET_INTEGER (STRING_TIER_NUMBER), GET_INTEGER (U"Preserve times"));
-	praat_new (thee.transfer(), U"dummy");
+	praat_new (thee.move(), U"dummy");
 END2 }
 
-FORM (TextGrid_Sound_extractNonemptyIntervals, U"TextGrid & Sound: Extract non-empty intervals", 0) {
+FORM (TextGrid_Sound_extractNonemptyIntervals, U"TextGrid & Sound: Extract non-empty intervals", nullptr) {
 	INTEGER (STRING_TIER_NUMBER, U"1")
-	BOOLEAN (U"Preserve times", 0)
+	BOOLEAN (U"Preserve times", false)
 	OK2
 DO
-	TextGrid textgrid = NULL;
-	Sound sound = NULL;
+	TextGrid textgrid = nullptr;
+	Sound sound = nullptr;
 	LOOP {
 		if (CLASS == classTextGrid) textgrid = (TextGrid) OBJECT;
 		if (CLASS == classSound) sound = (Sound) OBJECT;
 	}
 	autoCollection thee = TextGrid_Sound_extractNonemptyIntervals (textgrid, sound,
 		GET_INTEGER (STRING_TIER_NUMBER), GET_INTEGER (U"Preserve times"));
-	praat_new (thee.transfer(), U"dummy");
+	praat_new (thee.move(), U"dummy");
 END2 }
 
-FORM (TextGrid_Sound_extractIntervals, U"TextGrid & Sound: Extract intervals", 0) {
+FORM (TextGrid_Sound_extractIntervals, U"TextGrid & Sound: Extract intervals", nullptr) {
 	INTEGER (STRING_TIER_NUMBER, U"1")
-	BOOLEAN (U"Preserve times", 0)
+	BOOLEAN (U"Preserve times", false)
 	SENTENCE (U"Label text", U"")
 	OK2
 DO
-	TextGrid textgrid = NULL;
-	Sound sound = NULL;
+	TextGrid textgrid = nullptr;
+	Sound sound = nullptr;
 	LOOP {
 		if (CLASS == classTextGrid) textgrid = (TextGrid) OBJECT;
 		if (CLASS == classSound) sound = (Sound) OBJECT;
@@ -556,18 +556,18 @@ DO
 	autoCollection thee = TextGrid_Sound_extractIntervalsWhere (textgrid, sound,
 		GET_INTEGER (STRING_TIER_NUMBER), kMelder_string_EQUAL_TO, GET_STRING (U"Label text"),
 		GET_INTEGER (U"Preserve times"));
-	praat_new (thee.transfer(), GET_STRING (U"Label text"));
+	praat_new (thee.move(), GET_STRING (U"Label text"));
 END2 }
 
-FORM (TextGrid_Sound_extractIntervalsWhere, U"TextGrid & Sound: Extract intervals", 0) {
+FORM (TextGrid_Sound_extractIntervalsWhere, U"TextGrid & Sound: Extract intervals", nullptr) {
 	INTEGER (STRING_TIER_NUMBER, U"1")
-	BOOLEAN (U"Preserve times", 0)
+	BOOLEAN (U"Preserve times", false)
 	OPTIONMENU_ENUM (U"Extract every interval whose label...", kMelder_string, DEFAULT)
 	SENTENCE (U"...the text", U"")
 	OK2
 DO
-	TextGrid textgrid = NULL;
-	Sound sound = NULL;
+	TextGrid textgrid = nullptr;
+	Sound sound = nullptr;
 	LOOP {
 		if (CLASS == classTextGrid) textgrid = (TextGrid) OBJECT;
 		if (CLASS == classSound) sound = (Sound) OBJECT;
@@ -577,12 +577,12 @@ DO
 		GET_ENUM (kMelder_string, U"Extract every interval whose label..."),
 		GET_STRING (U"...the text"),
 		GET_INTEGER (U"Preserve times"));
-	praat_new (thee.transfer(), GET_STRING (U"...the text"));
+	praat_new (thee.move(), GET_STRING (U"...the text"));
 END2 }
 
 DIRECT2 (TextGrid_Sound_scaleTimes) {
-	TextGrid textgrid = NULL;
-	Sound sound = NULL;
+	TextGrid textgrid = nullptr;
+	Sound sound = nullptr;
 	LOOP {
 		if (CLASS == classTextGrid) textgrid = (TextGrid) OBJECT;
 		if (CLASS == classSound) sound = (Sound) OBJECT;
@@ -592,8 +592,8 @@ DIRECT2 (TextGrid_Sound_scaleTimes) {
 END2 }
 
 DIRECT2 (TextGrid_Sound_cloneTimeDomain) {
-	TextGrid textgrid = NULL;
-	Sound sound = NULL;
+	TextGrid textgrid = nullptr;
+	Sound sound = nullptr;
 	LOOP {
 		if (CLASS == classTextGrid) textgrid = (TextGrid) OBJECT;
 		if (CLASS == classSound) sound = (Sound) OBJECT;
@@ -674,7 +674,7 @@ DIRECT2 (SpellingChecker_extractWordList) {
 	LOOP {
 		iam (SpellingChecker);
 		autoWordList thee = SpellingChecker_extractWordList (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -682,7 +682,7 @@ DIRECT2 (SpellingChecker_extractUserDictionary) {
 	LOOP {
 		iam (SpellingChecker);
 		autoSortedSetOfString thee = SpellingChecker_extractUserDictionary (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -715,8 +715,8 @@ DO
 END2 }
 
 DIRECT2 (SpellingChecker_replaceWordList) {
-	SpellingChecker spellingChecker = NULL;
-	WordList wordList = NULL;
+	SpellingChecker spellingChecker = nullptr;
+	WordList wordList = nullptr;
 	LOOP {
 		if (CLASS == classSpellingChecker) spellingChecker = (SpellingChecker) OBJECT;
 		if (CLASS == classWordList) wordList = (WordList) OBJECT;
@@ -732,8 +732,8 @@ DIRECT2 (SpellingChecker_replaceWordList_help) {
 END2 }
 
 DIRECT2 (SpellingChecker_replaceUserDictionary) {
-	SpellingChecker spellingChecker = NULL;
-	SortedSetOfString dictionary = NULL;
+	SpellingChecker spellingChecker = nullptr;
+	SortedSetOfString dictionary = nullptr;
 	LOOP {
 		if (CLASS == classSpellingChecker) spellingChecker = (SpellingChecker) OBJECT;
 		if (CLASS == classSortedSetOfString) dictionary = (SortedSetOfString) OBJECT;
@@ -785,7 +785,7 @@ DO
 	}
 END2 }
 
-FORM (TextGrid_downto_Table, U"TextGrid: Down to Table", 0) {
+FORM (TextGrid_downto_Table, U"TextGrid: Down to Table", nullptr) {
 	BOOLEAN (U"Include line number", false)
 	NATURAL (U"Time decimals", U"6")
 	BOOLEAN (U"Include tier names", true)
@@ -796,15 +796,15 @@ DO
 		iam (TextGrid);
 		autoTable thee = TextGrid_downto_Table (me, GET_INTEGER (U"Include line number"), GET_INTEGER (U"Time decimals"),
 			GET_INTEGER (U"Include tier names"), GET_INTEGER (U"Include empty intervals"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
-FORM (TextGrid_draw, U"TextGrid: Draw", 0) {
+FORM (TextGrid_draw, U"TextGrid: Draw", nullptr) {
 	praat_dia_timeRange (dia);
-	BOOLEAN (U"Show boundaries", 1)
-	BOOLEAN (U"Use text styles", 1)
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Show boundaries", true)
+	BOOLEAN (U"Use text styles", true)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	autoPraatPicture picture;
@@ -816,7 +816,7 @@ DO
 	}
 END2 }
 
-FORM (TextGrid_duplicateTier, U"TextGrid: Duplicate tier", 0) {
+FORM (TextGrid_duplicateTier, U"TextGrid: Duplicate tier", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	NATURAL (U"Position", U"1 (= at top)")
 	WORD (U"Name", U"")
@@ -835,9 +835,7 @@ DO
 	}
 END2 }
 
-static void cb_TextGridEditor_publication (Editor editor, void *closure, Daata publication) {
-	(void) editor;
-	(void) closure;
+static void cb_TextGridEditor_publication (Editor /* editor */, void * /* closure */, Daata publication) {
 	/*
 	 * Keep the gate for error handling.
 	 */
@@ -858,38 +856,38 @@ static void cb_TextGridEditor_publication (Editor editor, void *closure, Daata p
 }
 DIRECT2 (TextGrid_edit) {
 	if (theCurrentPraatApplication -> batch) Melder_throw (U"Cannot view or edit a TextGrid from batch.");
-	Sound sound = NULL;
+	Sound sound = nullptr;
 	LOOP {
-		if (CLASS == classSound) sound = (Sound) OBJECT;   // may stay NULL
+		if (CLASS == classSound) sound = (Sound) OBJECT;   // may stay null
 	}
 	LOOP if (CLASS == classTextGrid) {
 		iam (TextGrid);
-		autoTextGridEditor editor = TextGridEditor_create (ID_AND_FULL_NAME, me, sound, true, NULL, NULL);
-		Editor_setPublicationCallback (editor.peek(), cb_TextGridEditor_publication, NULL);
+		autoTextGridEditor editor = TextGridEditor_create (ID_AND_FULL_NAME, me, sound, true, nullptr, nullptr);
+		Editor_setPublicationCallback (editor.peek(), cb_TextGridEditor_publication, nullptr);
 		praat_installEditor (editor.transfer(), IOBJECT);
 	}
 END2 }
 
-FORM (TextGrid_editWithCallback, U"TextGrid: View & Edit with callback", 0) {
+FORM (TextGrid_editWithCallback, U"TextGrid: View & Edit with callback", nullptr) {
 	SENTENCE (U"Callback text", U"r1")
 	OK2
 DO
 	if (theCurrentPraatApplication -> batch) Melder_throw (U"Cannot view or edit a TextGrid from batch.");
-	Sound sound = NULL;
+	Sound sound = nullptr;
 	LOOP {
 		if (CLASS == classSound) sound = (Sound) OBJECT;   // may stay NULL
 	}
 	LOOP if (CLASS == classTextGrid) {
 		iam (TextGrid);
-		autoTextGridEditor editor = TextGridEditor_create (ID_AND_FULL_NAME, me, sound, true, NULL, Melder_peek32to8 (GET_STRING (U"Callback text")));
-		Editor_setPublicationCallback (editor.peek(), cb_TextGridEditor_publication, NULL);
+		autoTextGridEditor editor = TextGridEditor_create (ID_AND_FULL_NAME, me, sound, true, nullptr, Melder_peek32to8 (GET_STRING (U"Callback text")));
+		Editor_setPublicationCallback (editor.peek(), cb_TextGridEditor_publication, nullptr);
 		praat_installEditor (editor.transfer(), IOBJECT);
 	}
 END2 }
 
 DIRECT2 (TextGrid_LongSound_edit) {
 	if (theCurrentPraatApplication -> batch) Melder_throw (U"Cannot view or edit a TextGrid from batch.");
-	LongSound longSound = NULL;
+	LongSound longSound = nullptr;
 	int ilongSound = 0;
 	LOOP {
 		if (CLASS == classLongSound) longSound = (LongSound) OBJECT, ilongSound = IOBJECT;
@@ -897,8 +895,8 @@ DIRECT2 (TextGrid_LongSound_edit) {
 	Melder_assert (ilongSound != 0);
 	LOOP if (CLASS == classTextGrid) {
 		iam (TextGrid);
-		autoTextGridEditor editor = TextGridEditor_create (ID_AND_FULL_NAME, me, longSound, false, NULL, NULL);
-		Editor_setPublicationCallback (editor.peek(), cb_TextGridEditor_publication, NULL);
+		autoTextGridEditor editor = TextGridEditor_create (ID_AND_FULL_NAME, me, longSound, false, nullptr, nullptr);
+		Editor_setPublicationCallback (editor.peek(), cb_TextGridEditor_publication, nullptr);
 		praat_installEditor2 (editor.transfer(), IOBJECT, ilongSound);
 	}
 END2 }
@@ -915,7 +913,7 @@ DIRECT2 (TextGrid_SpellingChecker_edit) {
 	Melder_assert (ispellingChecker != 0);
 	LOOP if (CLASS == classTextGrid) {
 		iam (TextGrid);
-		autoTextGridEditor editor = TextGridEditor_create (ID_AND_FULL_NAME, me, sound, true, spellingChecker, NULL);
+		autoTextGridEditor editor = TextGridEditor_create (ID_AND_FULL_NAME, me, sound, true, spellingChecker, nullptr);
 		praat_installEditor2 (editor.transfer(), IOBJECT, ispellingChecker);
 	}
 END2 }
@@ -923,7 +921,7 @@ END2 }
 DIRECT2 (TextGrid_LongSound_SpellingChecker_edit) {
 	if (theCurrentPraatApplication -> batch) Melder_throw (U"Cannot view or edit a TextGrid from batch.");
 	LongSound longSound = NULL;
-	SpellingChecker spellingChecker = NULL;
+	SpellingChecker spellingChecker = nullptr;
 	int ilongSound = 0, ispellingChecker = 0;
 	LOOP {
 		if (CLASS == classLongSound) longSound = (LongSound) OBJECT, ilongSound = IOBJECT;
@@ -932,7 +930,7 @@ DIRECT2 (TextGrid_LongSound_SpellingChecker_edit) {
 	Melder_assert (ilongSound != 0 && ispellingChecker != 0);
 	LOOP if (CLASS == classTextGrid) {
 		iam (TextGrid);
-		autoTextGridEditor editor = TextGridEditor_create (ID_AND_FULL_NAME, me, longSound, false, spellingChecker, NULL);
+		autoTextGridEditor editor = TextGridEditor_create (ID_AND_FULL_NAME, me, longSound, false, spellingChecker, nullptr);
 		praat_installEditor3 (editor.transfer(), IOBJECT, ilongSound, ispellingChecker);
 	}
 END2 }
@@ -946,7 +944,7 @@ DO
 	LOOP {
 		iam (TextGrid);
 		autoTextGrid thee = TextGrid_extractPart (me, GET_REAL (U"left Time range"), GET_REAL (U"right Time range"), GET_INTEGER (U"Preserve times"));
-		praat_new (thee.transfer(), my name, U"_part");
+		praat_new (thee.move(), my name, U"_part");
 	}
 END2 }
 
@@ -989,23 +987,23 @@ static TextPoint pr_TextGrid_peekPoint (UiForm dia) {
 	return (TextPoint) textTier -> points -> item [pointNumber];
 }
 
-FORM (TextGrid_extractOneTier, U"TextGrid: Extract one tier", 0) {
+FORM (TextGrid_extractOneTier, U"TextGrid: Extract one tier", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	OK2
 DO
 	Function tier = pr_TextGrid_peekTier (dia);   // a reference
 	autoTextGrid grid = TextGrid_createWithoutTiers (1e30, -1e30);
 	TextGrid_addTier_copy (grid.peek(), tier);   // no transfer of tier ownership, because a copy is made
-	praat_new (grid.transfer(), tier -> name);
+	praat_new (grid.move(), tier -> name);
 END2 }
 
-FORM (TextGrid_extractTier, U"TextGrid: Extract tier", 0) {
+FORM (TextGrid_extractTier, U"TextGrid: Extract tier", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	OK2
 DO
 	Function tier = pr_TextGrid_peekTier (dia);
 	autoFunction thee = Data_copy (tier);
-	praat_new (thee.transfer(), tier -> name);
+	praat_new (thee.move(), tier -> name);
 END2 }
 
 DIRECT2 (TextGrid_genericize) {
@@ -1034,7 +1032,7 @@ DO
 	Melder_information (highIndex);
 END2 }
 
-FORM (TextGrid_getHighIntervalAtTime, U"TextGrid: Get high interval at time", 0) {
+FORM (TextGrid_getHighIntervalAtTime, U"TextGrid: Get high interval at time", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	REAL (U"Time (s)", U"0.5")
 	OK2
@@ -1044,7 +1042,7 @@ DO
 	Melder_information (index);
 END2 }
 
-FORM (TextGrid_getIntervalBoundaryFromTime, U"TextGrid: Get interval boundary from time", 0) {
+FORM (TextGrid_getIntervalBoundaryFromTime, U"TextGrid: Get interval boundary from time", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	REAL (U"Time (s)", U"0.5")
 	OK2
@@ -1054,7 +1052,7 @@ DO
 	Melder_information (index);
 END2 }
 
-FORM (TextGrid_getIntervalEdgeFromTime, U"TextGrid: Get interval edge from time", 0) {
+FORM (TextGrid_getIntervalEdgeFromTime, U"TextGrid: Get interval edge from time", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	REAL (U"Time (s)", U"0.5")
 	OK2
@@ -1074,7 +1072,7 @@ DO
 	Melder_information (lowIndex);
 END2 }
 
-FORM (TextGrid_getLowIntervalAtTime, U"TextGrid: Get low interval at time", 0) {
+FORM (TextGrid_getLowIntervalAtTime, U"TextGrid: Get low interval at time", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	REAL (U"Time (s)", U"0.5")
 	OK2
@@ -1094,7 +1092,7 @@ DO
 	Melder_information (nearestIndex);
 END2 }
 
-FORM (TextGrid_getIntervalAtTime, U"TextGrid: Get interval at time", 0) {
+FORM (TextGrid_getIntervalAtTime, U"TextGrid: Get interval at time", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	REAL (U"Time (s)", U"0.5")
 	OK2
@@ -1104,7 +1102,7 @@ DO
 	Melder_information (index);
 END2 }
 
-FORM (TextGrid_getNumberOfIntervals, U"TextGrid: Get number of intervals", 0) {
+FORM (TextGrid_getNumberOfIntervals, U"TextGrid: Get number of intervals", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	OK2
 DO
@@ -1121,7 +1119,7 @@ DIRECT2 (TextGrid_getNumberOfTiers) {
 	}
 END2 }
 
-FORM (TextGrid_getStartingPoint, U"TextGrid: Get starting point", 0) {
+FORM (TextGrid_getStartingPoint, U"TextGrid: Get starting point", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	NATURAL (STRING_INTERVAL_NUMBER, U"1")
 	OK2
@@ -1131,7 +1129,7 @@ DO
 	Melder_informationReal (startingPoint, U"seconds");
 END2 }
 
-FORM (TextGrid_getEndPoint, U"TextGrid: Get end point", 0) {
+FORM (TextGrid_getEndPoint, U"TextGrid: Get end point", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	NATURAL (STRING_INTERVAL_NUMBER, U"1")
 	OK2
@@ -1141,7 +1139,7 @@ DO
 	Melder_informationReal (endPoint, U"seconds");
 END2 }
 
-FORM (TextGrid_getLabelOfInterval, U"TextGrid: Get label of interval", 0) {
+FORM (TextGrid_getLabelOfInterval, U"TextGrid: Get label of interval", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	NATURAL (STRING_INTERVAL_NUMBER, U"1")
 	OK2
@@ -1152,7 +1150,7 @@ DO
 	MelderInfo_close ();
 END2 }
 
-FORM (TextGrid_getNumberOfPoints, U"TextGrid: Get number of points", 0) {
+FORM (TextGrid_getNumberOfPoints, U"TextGrid: Get number of points", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	OK2
 DO
@@ -1161,7 +1159,7 @@ DO
 	Melder_information (numberOfPoints);
 END2 }
 
-FORM (TextGrid_getTierName, U"TextGrid: Get tier name", 0) {
+FORM (TextGrid_getTierName, U"TextGrid: Get tier name", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	OK2
 DO
@@ -1169,7 +1167,7 @@ DO
 	Melder_information (tier -> name);
 END2 }
 
-FORM (TextGrid_getTimeOfPoint, U"TextGrid: Get time of point", 0) {
+FORM (TextGrid_getTimeOfPoint, U"TextGrid: Get time of point", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	NATURAL (STRING_POINT_NUMBER, U"1")
 	OK2
@@ -1178,7 +1176,7 @@ DO
 	Melder_informationReal (point -> number, U"seconds");
 END2 }
 
-FORM (TextGrid_getLabelOfPoint, U"TextGrid: Get label of point", 0) {
+FORM (TextGrid_getLabelOfPoint, U"TextGrid: Get label of point", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	NATURAL (STRING_POINT_NUMBER, U"1")
 	OK2
@@ -1191,7 +1189,7 @@ DIRECT2 (TextGrid_help) {
 	Melder_help (U"TextGrid");
 END2 }
 
-FORM (TextGrid_insertBoundary, U"TextGrid: Insert boundary", 0) {
+FORM (TextGrid_insertBoundary, U"TextGrid: Insert boundary", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	REAL (U"Time (s)", U"0.5")
 	OK2
@@ -1203,7 +1201,7 @@ DO
 	}
 END2 }
 
-FORM (TextGrid_insertIntervalTier, U"TextGrid: Insert interval tier", 0) {
+FORM (TextGrid_insertIntervalTier, U"TextGrid: Insert interval tier", nullptr) {
 	NATURAL (U"Position", U"1 (= at top)")
 	WORD (U"Name", U"")
 	OK2
@@ -1220,7 +1218,7 @@ DO
 	}
 END2 }
 
-FORM (TextGrid_insertPoint, U"TextGrid: Insert point", 0) {
+FORM (TextGrid_insertPoint, U"TextGrid: Insert point", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	REAL (U"Time (s)", U"0.5")
 	LABEL (U"", U"Text:")
@@ -1234,7 +1232,7 @@ DO
 	}
 END2 }
 
-FORM (TextGrid_insertPointTier, U"TextGrid: Insert point tier", 0) {
+FORM (TextGrid_insertPointTier, U"TextGrid: Insert point tier", nullptr) {
 	NATURAL (U"Position", U"1 (= at top)")
 	WORD (U"Name", U"")
 	OK2
@@ -1251,7 +1249,7 @@ DO
 	}
 END2 }
 
-FORM (TextGrid_isIntervalTier, U"TextGrid: Is interval tier?", 0) {
+FORM (TextGrid_isIntervalTier, U"TextGrid: Is interval tier?", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	OK2
 DO
@@ -1263,7 +1261,7 @@ DO
 	}
 END2 }
 
-FORM (TextGrid_list, U"TextGrid: List", 0) {
+FORM (TextGrid_list, U"TextGrid: List", nullptr) {
 	BOOLEAN (U"Include line number", false)
 	NATURAL (U"Time decimals", U"6")
 	BOOLEAN (U"Include tier names", true)
@@ -1280,20 +1278,20 @@ END2 }
 DIRECT2 (TextGrids_concatenate) {
 	autoCollection textGrids = praat_getSelectedObjects ();
 	autoTextGrid thee = TextGrids_concatenate (textGrids.peek());
-	praat_new (thee.transfer(), U"chain");
+	praat_new (thee.move(), U"chain");
 END2 }
 
 DIRECT2 (TextGrids_merge) {
 	autoCollection textGrids = praat_getSelectedObjects ();
 	autoTextGrid thee = TextGrid_merge (textGrids.peek());
-	praat_new (thee.transfer(), U"merged");
+	praat_new (thee.move(), U"merged");
 END2 }
 
 DIRECT2 (info_TextGrid_Pitch_draw) {
 	Melder_information (U"You can draw a TextGrid together with a Pitch after selecting them both.");
 END2 }
 
-FORM (TextGrid_removeBoundaryAtTime, U"TextGrid: Remove boundary at time", 0) {
+FORM (TextGrid_removeBoundaryAtTime, U"TextGrid: Remove boundary at time", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	REAL (U"Time (s)", U"0.5")
 	OK2
@@ -1305,7 +1303,7 @@ DO
 	}
 END2 }
 
-FORM (TextGrid_getCentrePoints, U"TextGrid: Get centre points", 0) {
+FORM (TextGrid_getCentrePoints, U"TextGrid: Get centre points", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	OPTIONMENU_ENUM (U"Get centre points whose label", kMelder_string, DEFAULT)
 	SENTENCE (U"...the text", U"hi")
@@ -1316,11 +1314,11 @@ DO
 		iam (TextGrid);
 		autoPointProcess thee = TextGrid_getCentrePoints (me, GET_INTEGER (STRING_TIER_NUMBER),
 			GET_ENUM (kMelder_string, U"Get centre points whose label"), text);
-		praat_new (thee.transfer(), my name, U"_", text);
+		praat_new (thee.move(), my name, U"_", text);
 	}
 END2 }
 
-FORM (TextGrid_getEndPoints, U"TextGrid: Get end points", 0) {
+FORM (TextGrid_getEndPoints, U"TextGrid: Get end points", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	OPTIONMENU_ENUM (U"Get end points whose label", kMelder_string, DEFAULT)
 	SENTENCE (U"...the text", U"hi")
@@ -1331,11 +1329,11 @@ DO
 		iam (TextGrid);
 		autoPointProcess thee = TextGrid_getEndPoints (me, GET_INTEGER (STRING_TIER_NUMBER),
 			GET_ENUM (kMelder_string, U"Get end points whose label"), text);
-		praat_new (thee.transfer(), my name, U"_", text);
+		praat_new (thee.move(), my name, U"_", text);
 	}
 END2 }
 
-FORM (TextGrid_getStartingPoints, U"TextGrid: Get starting points", 0) {
+FORM (TextGrid_getStartingPoints, U"TextGrid: Get starting points", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	OPTIONMENU_ENUM (U"Get starting points whose label", kMelder_string, DEFAULT)
 	SENTENCE (U"...the text", U"hi")
@@ -1346,11 +1344,11 @@ DO
 		iam (TextGrid);
 		autoPointProcess thee = TextGrid_getStartingPoints (me, GET_INTEGER (STRING_TIER_NUMBER),
 			GET_ENUM (kMelder_string, U"Get starting points whose label"), text);
-		praat_new (thee.transfer(), my name, U"_", text);
+		praat_new (thee.move(), my name, U"_", text);
 	}
 END2 }
 
-FORM (TextGrid_getPoints, U"Get points", 0) {
+FORM (TextGrid_getPoints, U"Get points", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	OPTIONMENU_ENUM (U"Get points whose label", kMelder_string, DEFAULT)
 	SENTENCE (U"...the text", U"hi")
@@ -1361,11 +1359,11 @@ DO
 		iam (TextGrid);
 		autoPointProcess thee = TextGrid_getPoints (me, GET_INTEGER (STRING_TIER_NUMBER),
 			GET_ENUM (kMelder_string, U"Get points whose label"), text);
-		praat_new (thee.transfer(), my name, U"_", text);
+		praat_new (thee.move(), my name, U"_", text);
 	}
 END2 }
 
-FORM (TextGrid_getPoints_followed, U"Get points (followed)", 0) {
+FORM (TextGrid_getPoints_followed, U"Get points (followed)", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	OPTIONMENU_ENUM (U"Get points whose label", kMelder_string, DEFAULT)
 	SENTENCE (U"...the text", U"hi")
@@ -1380,11 +1378,11 @@ DO
 		autoPointProcess thee = TextGrid_getPoints_followed (me, GET_INTEGER (STRING_TIER_NUMBER),
 			GET_ENUM (kMelder_string, U"Get points whose label"), text,
 			GET_ENUM (kMelder_string, U"followed by a label that"), following);
-		praat_new (thee.transfer(), my name, U"_", text);
+		praat_new (thee.move(), my name, U"_", text);
 	}
 END2 }
 
-FORM (TextGrid_getPoints_preceded, U"Get points (preceded)", 0) {
+FORM (TextGrid_getPoints_preceded, U"Get points (preceded)", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	OPTIONMENU_ENUM (U"Get points whose label", kMelder_string, DEFAULT)
 	SENTENCE (U"...the text", U"there")
@@ -1399,11 +1397,11 @@ DO
 		autoPointProcess thee = TextGrid_getPoints_preceded (me, GET_INTEGER (STRING_TIER_NUMBER),
 			GET_ENUM (kMelder_string, U"Get points whose label"), text,
 			GET_ENUM (kMelder_string, U"preceded by a label that"), preceding);
-		praat_new (thee.transfer(), my name, U"_", text);
+		praat_new (thee.move(), my name, U"_", text);
 	}
 END2 }
 
-FORM (TextGrid_removeLeftBoundary, U"TextGrid: Remove left boundary", 0) {
+FORM (TextGrid_removeLeftBoundary, U"TextGrid: Remove left boundary", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	NATURAL (STRING_INTERVAL_NUMBER, U"2")
 	OK2
@@ -1431,7 +1429,7 @@ DO
 	}
 END2 }
 
-FORM (TextGrid_removePoint, U"TextGrid: Remove point", 0) {
+FORM (TextGrid_removePoint, U"TextGrid: Remove point", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	NATURAL (STRING_POINT_NUMBER, U"2")
 	OK2
@@ -1456,7 +1454,7 @@ DO
 	}
 END2 }
 
-FORM (TextGrid_removePoints, U"Remove points", 0) {
+FORM (TextGrid_removePoints, U"Remove points", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	OPTIONMENU_ENUM (U"Remove every point whose label...", kMelder_string, DEFAULT)
 	SENTENCE (U"...the text", U"hi")
@@ -1469,7 +1467,7 @@ DO
 	}
 END2 }
 
-FORM (TextGrid_removeRightBoundary, U"TextGrid: Remove right boundary", 0) {
+FORM (TextGrid_removeRightBoundary, U"TextGrid: Remove right boundary", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	NATURAL (STRING_INTERVAL_NUMBER, U"1")
 	OK2
@@ -1497,7 +1495,7 @@ DO
 	}
 END2 }
 
-FORM (TextGrid_removeTier, U"TextGrid: Remove tier", 0) {
+FORM (TextGrid_removeTier, U"TextGrid: Remove tier", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	OK2
 DO
@@ -1521,7 +1519,7 @@ DIRECT2 (info_TextGrid_Sound_draw) {
 	Melder_information (U"You can draw a TextGrid together with a Sound after selecting them both.");
 END2 }
 
-FORM (TextGrid_setIntervalText, U"TextGrid: Set interval text", 0) {
+FORM (TextGrid_setIntervalText, U"TextGrid: Set interval text", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	NATURAL (STRING_INTERVAL_NUMBER, U"1")
 	LABEL (U"", U"Text:")
@@ -1535,7 +1533,7 @@ DO
 	}
 END2 }
 
-FORM (TextGrid_setPointText, U"TextGrid: Set point text", 0) {
+FORM (TextGrid_setPointText, U"TextGrid: Set point text", nullptr) {
 	NATURAL (STRING_TIER_NUMBER, U"1")
 	NATURAL (STRING_POINT_NUMBER, U"1")
 	LABEL (U"", U"Text:")
@@ -1549,7 +1547,7 @@ DO
 	}
 END2 }
 
-FORM_WRITE2 (TextGrid_writeToChronologicalTextFile, U"Text file", 0, 0) {
+FORM_WRITE2 (TextGrid_writeToChronologicalTextFile, U"Text file", nullptr, nullptr) {
 	LOOP {
 		iam (TextGrid);
 		TextGrid_writeToChronologicalTextFile (me, file);
@@ -1559,7 +1557,7 @@ END2 }
 /***** TEXTGRID & ANYTIER *****/
 
 DIRECT2 (TextGrid_AnyTier_append) {
-	TextGrid oldGrid = NULL;
+	TextGrid oldGrid = nullptr;
 	LOOP {
 		if (CLASS == classTextGrid) oldGrid = (TextGrid) OBJECT;
 	}
@@ -1568,14 +1566,14 @@ DIRECT2 (TextGrid_AnyTier_append) {
 		iam (AnyTier);
 		TextGrid_addTier_copy (newGrid.peek(), me);
 	}
-	praat_new (newGrid.transfer(), oldGrid -> name);
+	praat_new (newGrid.move(), oldGrid -> name);
 END2 }
 
 /***** TEXTGRID & LONGSOUND *****/
 
 DIRECT2 (TextGrid_LongSound_scaleTimes) {
-	TextGrid grid = NULL;
-	LongSound longSound = NULL;
+	TextGrid grid = nullptr;
+	LongSound longSound = nullptr;
 	LOOP {
 		if (CLASS == classTextGrid) grid = (TextGrid) OBJECT;
 		if (CLASS == classLongSound) longSound = (LongSound) OBJECT;
@@ -1602,18 +1600,18 @@ DIRECT2 (TextTier_downto_PointProcess) {
 	LOOP {
 		iam (TextTier);
 		autoPointProcess thee = AnyTier_downto_PointProcess (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
-FORM (TextTier_downto_TableOfReal, U"TextTier: Down to TableOfReal", 0) {
+FORM (TextTier_downto_TableOfReal, U"TextTier: Down to TableOfReal", nullptr) {
 	SENTENCE (U"Label", U"")
 	OK2
 DO
 	LOOP {
 		iam (TextTier);
 		autoTableOfReal thee = TextTier_downto_TableOfReal (me, GET_STRING (U"Label"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1621,11 +1619,11 @@ DIRECT2 (TextTier_downto_TableOfReal_any) {
 	LOOP {
 		iam (TextTier);
 		autoTableOfReal thee = TextTier_downto_TableOfReal_any (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
-FORM (TextTier_getLabelOfPoint, U"Get label of point", 0) {
+FORM (TextTier_getLabelOfPoint, U"Get label of point", nullptr) {
 	NATURAL (U"Point number", U"1")
 	OK2
 DO
@@ -1638,14 +1636,14 @@ DO
 	}
 END2 }
 
-FORM (TextTier_getPoints, U"Get points", 0) {
+FORM (TextTier_getPoints, U"Get points", nullptr) {
 	SENTENCE (U"Text", U"")
 	OK2
 DO
 	LOOP {
 		iam (TextTier);
 		autoPointProcess thee = TextTier_getPoints (me, GET_STRING (U"Text"));
-		praat_new (thee.transfer(), GET_STRING (U"Text"));
+		praat_new (thee.move(), GET_STRING (U"Text"));
 	}
 END2 }
 
@@ -1670,7 +1668,7 @@ DIRECT2 (WordList_to_Strings) {
 	LOOP {
 		iam (WordList);
 		autoStrings thee = WordList_to_Strings (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1678,7 +1676,7 @@ DIRECT2 (WordList_upto_SpellingChecker) {
 	LOOP {
 		iam (WordList);
 		autoSpellingChecker thee = WordList_upto_SpellingChecker (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
diff --git a/gram/Network.cpp b/gram/Network.cpp
index 5c0ce18..de3d392 100644
--- a/gram/Network.cpp
+++ b/gram/Network.cpp
@@ -98,7 +98,7 @@ void Network_init (Network me, double spreadingRate, enum kNetwork_activityClipp
 	my connections = NUMvector <structNetworkConnection> (1, numberOfConnections);
 }
 
-Network Network_create (double spreadingRate, enum kNetwork_activityClippingRule activityClippingRule,
+autoNetwork Network_create (double spreadingRate, enum kNetwork_activityClippingRule activityClippingRule,
 	double minimumActivity, double maximumActivity, double activityLeak,
 	double learningRate, double minimumWeight, double maximumWeight, double weightLeak,
 	double xmin, double xmax, double ymin, double ymax, long numberOfNodes, long numberOfConnections)
@@ -108,7 +108,7 @@ Network Network_create (double spreadingRate, enum kNetwork_activityClippingRule
 		Network_init (me.peek(), spreadingRate, activityClippingRule, minimumActivity, maximumActivity, activityLeak,
 			learningRate, minimumWeight, maximumWeight, weightLeak,
 			xmin, xmax, ymin, ymax, numberOfNodes, numberOfConnections);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Network not created.");
 	}
@@ -277,7 +277,7 @@ void Network_normalizeWeights (Network me, long nodeMin, long nodeMax, long node
 	}
 }
 
-Network Network_create_rectangle (double spreadingRate, enum kNetwork_activityClippingRule activityClippingRule,
+autoNetwork Network_create_rectangle (double spreadingRate, enum kNetwork_activityClippingRule activityClippingRule,
 	double minimumActivity, double maximumActivity, double activityLeak,
 	double learningRate, double minimumWeight, double maximumWeight, double weightLeak,
 	long numberOfRows, long numberOfColumns, bool bottomRowClamped,
@@ -321,13 +321,13 @@ Network Network_create_rectangle (double spreadingRate, enum kNetwork_activityCl
 			}
 		}
 		Melder_assert (iconn == my numberOfConnections);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Rectangular network not created.");
 	}
 }
 
-Network Network_create_rectangle_vertical (double spreadingRate, enum kNetwork_activityClippingRule activityClippingRule,
+autoNetwork Network_create_rectangle_vertical (double spreadingRate, enum kNetwork_activityClippingRule activityClippingRule,
 	double minimumActivity, double maximumActivity, double activityLeak,
 	double learningRate, double minimumWeight, double maximumWeight, double weightLeak,
 	long numberOfRows, long numberOfColumns, bool bottomRowClamped,
@@ -364,7 +364,7 @@ Network Network_create_rectangle_vertical (double spreadingRate, enum kNetwork_a
 			}
 		}
 		Melder_assert (iconn == my numberOfConnections);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Vertical rectangular network not created.");
 	}
@@ -482,7 +482,7 @@ void Network_setActivityClippingRule (Network me, enum kNetwork_activityClipping
 	Network_zeroActivities (me, 0, 0);
 }
 
-Table Network_nodes_downto_Table (Network me, long fromNodeNumber, long toNodeNumber,
+autoTable Network_nodes_downto_Table (Network me, long fromNodeNumber, long toNodeNumber,
 	bool includeNodeNumbers,
 	bool includeX, bool includeY, int positionDecimals,
 	bool includeClamped,
@@ -514,7 +514,7 @@ Table Network_nodes_downto_Table (Network me, long fromNodeNumber, long toNodeNu
 			if (includeActivity)    Table_setStringValue  (thee.peek(), inode, ++ icol, Melder_fixed (node -> activity,   activityDecimals));
 			if (includeExcitation)  Table_setStringValue  (thee.peek(), inode, ++ icol, Melder_fixed (node -> excitation, activityDecimals));
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not converted to Table.");
 	}
diff --git a/gram/Network.h b/gram/Network.h
index bdba30e..565f6fd 100644
--- a/gram/Network.h
+++ b/gram/Network.h
@@ -32,18 +32,18 @@ void Network_init (Network me,
 	double learningRate, double minimumWeight, double maximumWeight, double weightLeak,
 	double xmin, double xmax, double ymin, double ymax, long numberOfNodes, long numberOfConnections);
 
-Network Network_create (double spreadingRate, enum kNetwork_activityClippingRule activityClippingRule,
+autoNetwork Network_create (double spreadingRate, enum kNetwork_activityClippingRule activityClippingRule,
 	double minimumActivity, double maximumActivity, double activityLeak,
 	double learningRate, double minimumWeight, double maximumWeight, double weightLeak,
 	double xmin, double xmax, double ymin, double ymax, long numberOfNodes, long numberOfConnections);
 
-Network Network_create_rectangle (double spreadingRate, enum kNetwork_activityClippingRule activityClippingRule,
+autoNetwork Network_create_rectangle (double spreadingRate, enum kNetwork_activityClippingRule activityClippingRule,
 	double minimumActivity, double maximumActivity, double activityLeak,
 	double learningRate, double minimumWeight, double maximumWeight, double weightLeak,
 	long numberOfRows, long numberOfColumns, bool bottomRowClamped,
 	double initialMinimumWeight, double initialMaximumWeight);
 
-Network Network_create_rectangle_vertical (double spreadingRate, enum kNetwork_activityClippingRule activityClippingRule,
+autoNetwork Network_create_rectangle_vertical (double spreadingRate, enum kNetwork_activityClippingRule activityClippingRule,
 	double minimumActivity, double maximumActivity, double activityLeak,
 	double learningRate, double minimumWeight, double maximumWeight, double weightLeak,
 	long numberOfRows, long numberOfColumns, bool bottomRowClamped,
@@ -68,7 +68,7 @@ void Network_setWeightLeak (Network me, double weightLeak);
 void Network_setActivityLeak (Network me, double activityLeak);
 void Network_setShunting (Network me, double shunting);
 void Network_setActivityClippingRule (Network me, enum kNetwork_activityClippingRule activityClippingRule);
-Table Network_nodes_downto_Table (Network me, long fromNodeNumber, long toNodeNumber,
+autoTable Network_nodes_downto_Table (Network me, long fromNodeNumber, long toNodeNumber,
 	bool includeNodeNumbers,
 	bool includeX, bool includeY, int positionDecimals,
 	bool includeClamped,
diff --git a/gram/OTGrammar.cpp b/gram/OTGrammar.cpp
index cf06d69..58b2336 100644
--- a/gram/OTGrammar.cpp
+++ b/gram/OTGrammar.cpp
@@ -985,7 +985,7 @@ void OTGrammar_drawTableau (OTGrammar me, Graphics g, bool vertical, const char3
 	}
 }
 
-Strings OTGrammar_generateInputs (OTGrammar me, long numberOfTrials) {
+autoStrings OTGrammar_generateInputs (OTGrammar me, long numberOfTrials) {
 	try {
 		autoStrings thee = Thing_new (Strings);
 		thy strings = NUMvector <char32 *> (1, thy numberOfStrings = numberOfTrials);
@@ -993,20 +993,20 @@ Strings OTGrammar_generateInputs (OTGrammar me, long numberOfTrials) {
 			long itab = NUMrandomInteger (1, my numberOfTableaus);
 			thy strings [i] = Melder_dup (my tableaus [itab]. input);
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": inputs not generated.");
 	}
 }
 
-Strings OTGrammar_getInputs (OTGrammar me) {
+autoStrings OTGrammar_getInputs (OTGrammar me) {
 	try {
 		autoStrings thee = Thing_new (Strings);
 		thy strings = NUMvector <char32 *> (1, thy numberOfStrings = my numberOfTableaus);
 		for (long i = 1; i <= my numberOfTableaus; i ++) {
 			thy strings [i] = Melder_dup (my tableaus [i]. input);
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": inputs not gotten.");
 	}
@@ -1025,7 +1025,7 @@ void OTGrammar_inputToOutput (OTGrammar me, const char32 *input, char32 *output,
 	}
 }
 
-Strings OTGrammar_inputsToOutputs (OTGrammar me, Strings inputs, double evaluationNoise) {
+autoStrings OTGrammar_inputsToOutputs (OTGrammar me, Strings inputs, double evaluationNoise) {
 	try {
 		autoStrings him = Thing_new (Strings);
 		long n = inputs -> numberOfStrings;
@@ -1036,13 +1036,13 @@ Strings OTGrammar_inputsToOutputs (OTGrammar me, Strings inputs, double evaluati
 			OTGrammar_inputToOutput (me, inputs -> strings [i], output, evaluationNoise);
 			his strings [i] = Melder_dup (output);
 		}
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (me, U": outputs not computed.");
 	}
 }
 
-Strings OTGrammar_inputToOutputs (OTGrammar me, const char32 *input, long n, double evaluationNoise) {
+autoStrings OTGrammar_inputToOutputs (OTGrammar me, const char32 *input, long n, double evaluationNoise) {
 	try {
 		autoStrings thee = Thing_new (Strings);
 		thy numberOfStrings = n;
@@ -1052,13 +1052,13 @@ Strings OTGrammar_inputToOutputs (OTGrammar me, const char32 *input, long n, dou
 			OTGrammar_inputToOutput (me, input, output, evaluationNoise);
 			thy strings [i] = Melder_dup (output);
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": output not computed.");
 	}
 }
 
-Distributions OTGrammar_to_Distribution (OTGrammar me, long trialsPerInput, double noise) {
+autoDistributions OTGrammar_to_Distribution (OTGrammar me, long trialsPerInput, double noise) {
 	try {
 		long totalNumberOfOutputs = 0, nout = 0;
 		/*
@@ -1096,13 +1096,13 @@ Distributions OTGrammar_to_Distribution (OTGrammar me, long trialsPerInput, doub
 			 */
 			nout += tableau -> numberOfCandidates;
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": output distribution not computed.");
 	}
 }
 
-PairDistribution OTGrammar_to_PairDistribution (OTGrammar me, long trialsPerInput, double noise) {
+autoPairDistribution OTGrammar_to_PairDistribution (OTGrammar me, long trialsPerInput, double noise) {
 	try {
 		long totalNumberOfOutputs = 0, nout = 0;
 		/*
@@ -1141,7 +1141,7 @@ PairDistribution OTGrammar_to_PairDistribution (OTGrammar me, long trialsPerInpu
 			 */
 			nout += tableau -> numberOfCandidates;
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": output distribution not computed.");
 	}
@@ -1158,7 +1158,7 @@ static bool honoursFixedRankings (OTGrammar me) {
 	return true;
 }
 
-Distributions OTGrammar_measureTypology (OTGrammar me) {
+autoDistributions OTGrammar_measureTypology (OTGrammar me) {
 	try {
 		long totalNumberOfOutputs = 0, nout = 0, ncons = my numberOfConstraints, nperm, factorial [1+12];
 		if (ncons > 12)
@@ -1219,7 +1219,7 @@ Distributions OTGrammar_measureTypology (OTGrammar me) {
 			 */
 			nout += tableau -> numberOfCandidates;
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": typology not measured.");
 	}
@@ -2076,7 +2076,7 @@ static void OTGrammar_learnOneFromPartialOutput_opt (OTGrammar me, const char32
 	}
 }
 
-static OTHistory OTGrammar_createHistory (OTGrammar me, long storeHistoryEvery, long numberOfData) {
+static autoOTHistory OTGrammar_createHistory (OTGrammar me, long storeHistoryEvery, long numberOfData) {
 	try {
 		long numberOfSamplingPoints = numberOfData / storeHistoryEvery, icons;   // e.g. 0, 20, 40, ...
 		autoOTHistory thee = Thing_new (OTHistory);
@@ -2090,7 +2090,7 @@ static OTHistory OTGrammar_createHistory (OTGrammar me, long storeHistoryEvery,
 		for (icons = 1; icons <= my numberOfConstraints; icons ++) {
 			thy data [1] [icons + 1] = my constraints [icons]. ranking;
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": history not created.");
 	}
@@ -2128,12 +2128,12 @@ static void OTGrammar_finalizeHistory (OTGrammar me, OTHistory thee, long idatum
 void OTGrammar_learnFromPartialOutputs (OTGrammar me, Strings partialOutputs,
 	double evaluationNoise, enum kOTGrammar_rerankingStrategy updateRule, bool honourLocalRankings,
 	double plasticity, double relativePlasticityNoise, long numberOfChews,
-	long storeHistoryEvery, OTHistory *history_out)
+	long storeHistoryEvery, autoOTHistory *history_out)
 {
 	try {
 		autoOTHistory history;
 		if (storeHistoryEvery) {
-			history.reset (OTGrammar_createHistory (me, storeHistoryEvery, partialOutputs -> numberOfStrings));
+			history = OTGrammar_createHistory (me, storeHistoryEvery, partialOutputs -> numberOfStrings);
 		}
 		try {
 			for (long idatum = 1; idatum <= partialOutputs -> numberOfStrings; idatum ++) {
@@ -2154,9 +2154,9 @@ void OTGrammar_learnFromPartialOutputs (OTGrammar me, Strings partialOutputs,
 			if (history.peek()) {
 				OTGrammar_finalizeHistory (me, history.peek(), partialOutputs -> numberOfStrings);
 			}
-			*history_out = history.transfer();
+			*history_out = history.move();
 		} catch (MelderError) {
-			*history_out = history.transfer();   // so that we can inspect
+			*history_out = history.move();   // so that we can inspect
 			throw;
 		}
 	} catch (MelderError) {
@@ -2218,7 +2218,7 @@ void OTGrammar_Distributions_learnFromPartialOutputs (OTGrammar me, Distribution
 	double evaluationNoise, enum kOTGrammar_rerankingStrategy updateRule, bool honourLocalRankings,
 	double initialPlasticity, long replicationsPerPlasticity, double plasticityDecrement,
 	long numberOfPlasticities, double relativePlasticityNoise, long numberOfChews,
-	long storeHistoryEvery, OTHistory *history_out,
+	long storeHistoryEvery, autoOTHistory *history_out,
 	bool resampleForVirtualProduction, bool compareOnlyPartialOutput, long resampleForCorrectForm)
 {
 	long idatum = 0;
@@ -2231,7 +2231,7 @@ void OTGrammar_Distributions_learnFromPartialOutputs (OTGrammar me, Distribution
 			Graphics_clearWs (monitor.graphics());
 		}
 		if (storeHistoryEvery) {
-			history.reset (OTGrammar_createHistory (me, storeHistoryEvery, numberOfData));
+			history = OTGrammar_createHistory (me, storeHistoryEvery, numberOfData);
 		}
 		try {
 			double plasticity = initialPlasticity;
@@ -2275,11 +2275,11 @@ void OTGrammar_Distributions_learnFromPartialOutputs (OTGrammar me, Distribution
 			}
 			OTGrammar_opt_deleteOutputMatching (me);
 			if (history_out)
-				*history_out = history.transfer();
+				*history_out = history.move();
 		} catch (MelderError) {
 			OTGrammar_opt_deleteOutputMatching (me);
 			if (history_out)
-				*history_out = history.transfer();   // so that we can inspect
+				*history_out = history.move();   // so that we can inspect
 			throw;
 		}
 	} catch (MelderError) {
diff --git a/gram/OTGrammar.h b/gram/OTGrammar.h
index b509a1a..3747309 100644
--- a/gram/OTGrammar.h
+++ b/gram/OTGrammar.h
@@ -82,14 +82,14 @@ bool OTGrammar_areAllPartialOutputsSinglyGrammatical (OTGrammar me, Strings thee
 
 void OTGrammar_drawTableau (OTGrammar me, Graphics g, bool vertical, const char32 *input);
 
-Strings OTGrammar_generateInputs (OTGrammar me, long numberOfTrials);
-Strings OTGrammar_getInputs (OTGrammar me);
+autoStrings OTGrammar_generateInputs (OTGrammar me, long numberOfTrials);
+autoStrings OTGrammar_getInputs (OTGrammar me);
 void OTGrammar_inputToOutput (OTGrammar me, const char32 *input, char32 *output, double evaluationNoise);
-Strings OTGrammar_inputsToOutputs (OTGrammar me, Strings inputs, double evaluationNoise);
-Strings OTGrammar_inputToOutputs (OTGrammar me, const char32 *input, long n, double evaluationNoise);
-Distributions OTGrammar_to_Distribution (OTGrammar me, long trialsPerInput, double evaluationNoise);
-PairDistribution OTGrammar_to_PairDistribution (OTGrammar me, long trialsPerInput, double evaluationNoise);
-Distributions OTGrammar_measureTypology (OTGrammar me);
+autoStrings OTGrammar_inputsToOutputs (OTGrammar me, Strings inputs, double evaluationNoise);
+autoStrings OTGrammar_inputToOutputs (OTGrammar me, const char32 *input, long n, double evaluationNoise);
+autoDistributions OTGrammar_to_Distribution (OTGrammar me, long trialsPerInput, double evaluationNoise);
+autoPairDistribution OTGrammar_to_PairDistribution (OTGrammar me, long trialsPerInput, double evaluationNoise);
+autoDistributions OTGrammar_measureTypology (OTGrammar me);
 
 void OTGrammar_learnOne (OTGrammar me, const char32 *input, const char32 *adultOutput,
 	double rankingSpreading, enum kOTGrammar_rerankingStrategy updateRule, bool honourLocalRankings,
@@ -108,12 +108,12 @@ void OTGrammar_learnOneFromPartialOutput (OTGrammar me, const char32 *partialAdu
 	double demotionMean, double relativeDemotionSpreading, long numberOfChews, bool warnIfStalled);
 void OTGrammar_learnFromPartialOutputs (OTGrammar me, Strings partialOutputs,
 	double rankingSpreading, enum kOTGrammar_rerankingStrategy updateRule, bool honourLocalRankings,
-	double demotionMean, double relativeDemotionSpreading, long numberOfChews, long storeHistoryEvery, OTHistory *history);
+	double demotionMean, double relativeDemotionSpreading, long numberOfChews, long storeHistoryEvery, autoOTHistory *history);
 void OTGrammar_Distributions_learnFromPartialOutputs (OTGrammar me, Distributions thee, long columnNumber,
 	double evaluationNoise, enum kOTGrammar_rerankingStrategy updateRule, bool honourLocalRankings,
 	double initialPlasticity, long replicationsPerPlasticity, double plasticityDecrement,
 	long numberOfPlasticities, double relativePlasticityNoise, long numberOfChews,
-	long storeHistoryEvery, OTHistory *history_out,
+	long storeHistoryEvery, autoOTHistory *history_out,
 	bool resampleForVirtualProduction, bool compareOnlyPartialOutput, long resampleForCorrectForm);
 double OTGrammar_PairDistribution_getFractionCorrect (OTGrammar me, PairDistribution thee,
 	double evaluationNoise, long numberOfInputs);
@@ -124,11 +124,11 @@ double OTGrammar_Distributions_getFractionCorrect (OTGrammar me, Distributions t
 
 void OTGrammar_checkIndex (OTGrammar me);
 
-OTGrammar OTGrammar_create_NoCoda_grammar ();
-OTGrammar OTGrammar_create_NPA_grammar ();
-PairDistribution OTGrammar_create_NPA_distribution ();
-OTGrammar OTGrammar_create_tongueRoot_grammar (int small_large, int equal_random_infant_Wolof);
-OTGrammar OTGrammar_create_metrics (int equal_footForm_wsp,
+autoOTGrammar OTGrammar_create_NoCoda_grammar ();
+autoOTGrammar OTGrammar_create_NPA_grammar ();
+autoPairDistribution OTGrammar_create_NPA_distribution ();
+autoOTGrammar OTGrammar_create_tongueRoot_grammar (int small_large, int equal_random_infant_Wolof);
+autoOTGrammar OTGrammar_create_metrics (int equal_footForm_wsp,
 	int trochaicityConstraint, int includeFootBimoraic, int includeFootBisyllabic,
 	int includePeripheral, int nonfinalityConstraint, int overtFormsHaveSecondaryStress, int includeClashAndLapse, int includeCodas);
 	/* T&S: 1, false, false, false, 1, true, false, false */
diff --git a/gram/OTGrammar_ex_NPA.cpp b/gram/OTGrammar_ex_NPA.cpp
index 4582992..1f52817 100644
--- a/gram/OTGrammar_ex_NPA.cpp
+++ b/gram/OTGrammar_ex_NPA.cpp
@@ -28,7 +28,7 @@
 
 #include "OTGrammar.h"
 
-OTGrammar OTGrammar_create_NPA_grammar () {
+autoOTGrammar OTGrammar_create_NPA_grammar () {
 	try {
 		OTGrammarCandidate candidate;
 		OTGrammarTableau tableau;
@@ -72,20 +72,20 @@ OTGrammar OTGrammar_create_NPA_grammar () {
 				candidate -> marks [3] = 1;
 		OTGrammar_checkIndex (me.peek());
 		OTGrammar_newDisharmonies (me.peek(), 0.0);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Nasal place assimilation grammar not created.");
 	}
 }
 
-PairDistribution OTGrammar_create_NPA_distribution () {
+autoPairDistribution OTGrammar_create_NPA_distribution () {
 	try {
 		autoPairDistribution me = PairDistribution_create ();
 		PairDistribution_add (me.peek(), U"at+ma", U"atma", 100);
 		PairDistribution_add (me.peek(), U"at+ma", U"apma",   0);
 		PairDistribution_add (me.peek(), U"an+pa", U"anpa",  20);
 		PairDistribution_add (me.peek(), U"an+pa", U"ampa",  80);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Nasal place assimilation distribution not created.");
 	}
diff --git a/gram/OTGrammar_ex_NoCoda.cpp b/gram/OTGrammar_ex_NoCoda.cpp
index 43447c5..4819898 100644
--- a/gram/OTGrammar_ex_NoCoda.cpp
+++ b/gram/OTGrammar_ex_NoCoda.cpp
@@ -19,7 +19,7 @@
 
 #include "OTGrammar.h"
 
-OTGrammar OTGrammar_create_NoCoda_grammar () {
+autoOTGrammar OTGrammar_create_NoCoda_grammar () {
 	try {
 		OTGrammarCandidate candidate;
 		OTGrammarTableau tableau;
@@ -54,7 +54,7 @@ OTGrammar OTGrammar_create_NoCoda_grammar () {
 				candidate -> marks = NUMvector <int> (1, candidate -> numberOfConstraints = 2);
 		OTGrammar_checkIndex (me.peek());
 		OTGrammar_newDisharmonies (me.peek(), 0.0);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"NoCoda grammar not created.");
 	}
diff --git a/gram/OTGrammar_ex_metrics.cpp b/gram/OTGrammar_ex_metrics.cpp
index acf2de4..fb5b060 100644
--- a/gram/OTGrammar_ex_metrics.cpp
+++ b/gram/OTGrammar_ex_metrics.cpp
@@ -435,7 +435,7 @@ static void replaceOutput (OTGrammarCandidate me) {
 	my output = Melder_dup (newOutput);
 }
 
-OTGrammar OTGrammar_create_metrics (int equal_footForm_wsp, int trochaicityConstraint, int includeFootBimoraic, int includeFootBisyllabic,
+autoOTGrammar OTGrammar_create_metrics (int equal_footForm_wsp, int trochaicityConstraint, int includeFootBimoraic, int includeFootBisyllabic,
 	int includePeripheral, int nonfinalityConstraint, int overtFormsHaveSecondaryStress,
 	int includeClashAndLapse, int includeCodas)
 {
@@ -523,7 +523,7 @@ OTGrammar OTGrammar_create_metrics (int equal_footForm_wsp, int trochaicityConst
 				}
 			}
 		}
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Metrics grammar not created.");
 	}
diff --git a/gram/OTGrammar_ex_tongueRoot.cpp b/gram/OTGrammar_ex_tongueRoot.cpp
index 1577057..a8ac2d9 100644
--- a/gram/OTGrammar_ex_tongueRoot.cpp
+++ b/gram/OTGrammar_ex_tongueRoot.cpp
@@ -56,7 +56,7 @@ static void OTGrammarCandidate_init (OTGrammarCandidate me, int ncons, int v1, i
 	if (isatr (v1) != isatr (v2)) my marks [5] ++;
 }
 
-OTGrammar OTGrammar_create_tongueRoot_grammar (int small_large, int equal_random_infant_Wolof) {
+autoOTGrammar OTGrammar_create_tongueRoot_grammar (int small_large, int equal_random_infant_Wolof) {
 	try {
 		int ncons = small_large == 1 ? 5 : 9, itab, v1, v2;
 		autoOTGrammar me = Thing_new (OTGrammar);
@@ -143,7 +143,7 @@ OTGrammar OTGrammar_create_tongueRoot_grammar (int small_large, int equal_random
 		OTGrammar_newDisharmonies (me.peek(), 0.0);
 		for (long icons = 1; icons <= my numberOfConstraints; icons ++)
 			my constraints [icons]. plasticity = 1.0;
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Tongue root grammar not created.");
 	}
diff --git a/gram/OTMulti.cpp b/gram/OTMulti.cpp
index b6c3c2f..cfdc973 100644
--- a/gram/OTMulti.cpp
+++ b/gram/OTMulti.cpp
@@ -886,7 +886,7 @@ static int OTMulti_updateHistory (OTMulti me, Table thee, long storeHistoryEvery
 
 void OTMulti_PairDistribution_learn (OTMulti me, PairDistribution thee, double evaluationNoise, enum kOTGrammar_rerankingStrategy updateRule, int direction,
 	double initialPlasticity, long replicationsPerPlasticity, double plasticityDecrement,
-	long numberOfPlasticities, double relativePlasticityNoise, long storeHistoryEvery, Table *history_out)
+	long numberOfPlasticities, double relativePlasticityNoise, long storeHistoryEvery, autoTable *history_out)
 {
 	long idatum = 0, numberOfData = numberOfPlasticities * replicationsPerPlasticity;
 	try {
@@ -946,7 +946,7 @@ void OTMulti_PairDistribution_learn (OTMulti me, PairDistribution thee, double e
 			plasticity *= plasticityDecrement;
 		}
 		if (history_out)
-			*history_out = history.transfer();
+			*history_out = history.move();
 	} catch (MelderError) {
 		if (idatum > 1)
 			Melder_appendError (U"Only ", idatum - 1, U" input-output pairs out of ", numberOfData, U" were processed.");
@@ -1397,7 +1397,7 @@ void OTMulti_generateOptimalForm (OTMulti me, const char32 *form1, const char32
 	}
 }
 
-Strings OTMulti_Strings_generateOptimalForms (OTMulti me, Strings thee, double evaluationNoise) {
+autoStrings OTMulti_Strings_generateOptimalForms (OTMulti me, Strings thee, double evaluationNoise) {
 	try {
 		autoStrings outputs = Thing_new (Strings);
 		long n = thy numberOfStrings;
@@ -1408,13 +1408,13 @@ Strings OTMulti_Strings_generateOptimalForms (OTMulti me, Strings thee, double e
 			OTMulti_generateOptimalForm (me, thy strings [i], U"", output, evaluationNoise);
 			outputs -> strings [i] = Melder_dup (output);
 		}
-		return outputs.transfer();
+		return outputs;
 	} catch (MelderError) {
 		Melder_throw (me, U" & ", thee, U": optimal forms not generated.");
 	}
 }
 
-Strings OTMulti_generateOptimalForms (OTMulti me, const char32 *form1, const char32 *form2, long numberOfTrials, double evaluationNoise) {
+autoStrings OTMulti_generateOptimalForms (OTMulti me, const char32 *form1, const char32 *form2, long numberOfTrials, double evaluationNoise) {
 	try {
 		autoStrings outputs = Thing_new (Strings);
 		outputs -> numberOfStrings = numberOfTrials;
@@ -1424,13 +1424,13 @@ Strings OTMulti_generateOptimalForms (OTMulti me, const char32 *form1, const cha
 			OTMulti_generateOptimalForm (me, form1, form2, output, evaluationNoise);
 			outputs -> strings [i] = Melder_dup (output);
 		}
-		return outputs.transfer();
+		return outputs;
 	} catch (MelderError) {
 		Melder_throw (me, U": optimal forms not generated.");
 	}
 }
 
-Distributions OTMulti_to_Distribution (OTMulti me, const char32 *form1, const char32 *form2,
+autoDistributions OTMulti_to_Distribution (OTMulti me, const char32 *form1, const char32 *form2,
 	long numberOfTrials, double evaluationNoise)
 {
 	try {
@@ -1466,7 +1466,7 @@ Distributions OTMulti_to_Distribution (OTMulti me, const char32 *form1, const ch
 			long iwinner = OTMulti_getWinner (me, form1, form2);
 			thy data [index [iwinner]] [1] += 1;
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": distribution not computed.");
 	}
diff --git a/gram/OTMulti.h b/gram/OTMulti.h
index 4521f63..9f7fb83 100644
--- a/gram/OTMulti.h
+++ b/gram/OTMulti.h
@@ -52,11 +52,11 @@ int OTMulti_learnOne (OTMulti me, const char32 *form1, const char32 *form2,
 void OTMulti_PairDistribution_learn (OTMulti me, PairDistribution thee,
 	double evaluationNoise, enum kOTGrammar_rerankingStrategy updateRule, int direction,
 	double initialPlasticity, long replicationsPerPlasticity, double plasticityDecrement,
-	long numberOfPlasticities, double relativePlasticityNoise, long storeHistoryEvery, Table *history_out);
+	long numberOfPlasticities, double relativePlasticityNoise, long storeHistoryEvery, autoTable *history_out);
 
 void OTMulti_drawTableau (OTMulti me, Graphics g, const char32 *form1, const char32 *form2, bool vertical, bool showDisharmonies);
 
-OTMulti OTMulti_create_metrics (int equal_footForm_wsp, int trochaicityConstraint, int includeFootBimoraic, int includeFootBisyllabic,
+autoOTMulti OTMulti_create_metrics (int equal_footForm_wsp, int trochaicityConstraint, int includeFootBimoraic, int includeFootBisyllabic,
 	int includePeripheral, int nonfinalityConstraint, int overtFormsHaveSecondaryStress,
 	int includeClashAndLapse, int includeCodas);
 
@@ -66,9 +66,9 @@ void OTMulti_setConstraintPlasticity (OTMulti me, long constraint, double plasti
 void OTMulti_removeConstraint (OTMulti me, const char32 *constraintName);
 
 void OTMulti_generateOptimalForm (OTMulti me, const char32 *form1, const char32 *form2, char32 *optimalForm, double evaluationNoise);
-Strings OTMulti_generateOptimalForms (OTMulti me, const char32 *form1, const char32 *form2, long numberOfTrials, double evaluationNoise);
-Distributions OTMulti_to_Distribution (OTMulti me, const char32 *form1, const char32 *form2, long numberOfTrials, double evaluationNoise);
-Strings OTMulti_Strings_generateOptimalForms (OTMulti me, Strings forms, double evaluationNoise);
+autoStrings OTMulti_generateOptimalForms (OTMulti me, const char32 *form1, const char32 *form2, long numberOfTrials, double evaluationNoise);
+autoDistributions OTMulti_to_Distribution (OTMulti me, const char32 *form1, const char32 *form2, long numberOfTrials, double evaluationNoise);
+autoStrings OTMulti_Strings_generateOptimalForms (OTMulti me, Strings forms, double evaluationNoise);
 
 /* End of file OTMulti.h */
 #endif
diff --git a/gram/OTMulti_ex_metrics.cpp b/gram/OTMulti_ex_metrics.cpp
index 24cedfe..97ffb2b 100644
--- a/gram/OTMulti_ex_metrics.cpp
+++ b/gram/OTMulti_ex_metrics.cpp
@@ -420,7 +420,7 @@ static void replaceOutput (OTCandidate me) {
 	my string = Melder_dup (newString);
 }
 
-OTMulti OTMulti_create_metrics (int equal_footForm_wsp, int trochaicityConstraint, int includeFootBimoraic, int includeFootBisyllabic,
+autoOTMulti OTMulti_create_metrics (int equal_footForm_wsp, int trochaicityConstraint, int includeFootBimoraic, int includeFootBisyllabic,
 	int includePeripheral, int nonfinalityConstraint, int overtFormsHaveSecondaryStress,
 	int includeClashAndLapse, int includeCodas)
 {
@@ -508,7 +508,7 @@ OTMulti OTMulti_create_metrics (int equal_footForm_wsp, int trochaicityConstrain
 				replaceOutput (& my candidates [icand]);
 			}
 		}
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Metrics grammar not created.");
 	}
diff --git a/gram/manual_gram.cpp b/gram/manual_gram.cpp
index cb31790..6f998b7 100644
--- a/gram/manual_gram.cpp
+++ b/gram/manual_gram.cpp
@@ -21,84 +21,72 @@
 #include "OTGrammar.h"
 
 static void draw_NoCoda_pat (Graphics g) {
-	OTGrammar ot = OTGrammar_create_NoCoda_grammar ();
-	OTGrammar_drawTableau (ot, g, false, U"pat");
-	forget (ot);
+	autoOTGrammar ot = OTGrammar_create_NoCoda_grammar ();
+	OTGrammar_drawTableau (ot.get(), g, false, U"pat");
 }
 static void draw_NoCoda_pa (Graphics g) {
-	OTGrammar ot = OTGrammar_create_NoCoda_grammar ();
-	OTGrammar_drawTableau (ot, g, false, U"pa");
-	forget (ot);
+	autoOTGrammar ot = OTGrammar_create_NoCoda_grammar ();
+	OTGrammar_drawTableau (ot.get(), g, false, U"pa");
 }
 static void draw_NoCoda_reverse (Graphics g) {
-	OTGrammar ot = OTGrammar_create_NoCoda_grammar ();
+	autoOTGrammar ot = OTGrammar_create_NoCoda_grammar ();
 	ot -> index [1] = 2;
 	ot -> index [2] = 1;
-	OTGrammar_drawTableau (ot, g, false, U"pat");
-	forget (ot);
+	OTGrammar_drawTableau (ot.get(), g, false, U"pat");
 }
 static void draw_NPA_assimilate_anpa (Graphics g) {
-	OTGrammar ot = OTGrammar_create_NPA_grammar ();
+	autoOTGrammar ot = OTGrammar_create_NPA_grammar ();
 	ot -> index [1] = 3;
 	ot -> index [2] = 1;
 	ot -> index [3] = 2;
-	OTGrammar_drawTableau (ot, g, false, U"an+pa");
-	forget (ot);
+	OTGrammar_drawTableau (ot.get(), g, false, U"an+pa");
 }
 static void draw_NPA_assimilate_atma (Graphics g) {
-	OTGrammar ot = OTGrammar_create_NPA_grammar ();
+	autoOTGrammar ot = OTGrammar_create_NPA_grammar ();
 	ot -> index [1] = 3;
 	ot -> index [2] = 1;
 	ot -> index [3] = 2;
-	OTGrammar_drawTableau (ot, g, false, U"at+ma");
-	forget (ot);
+	OTGrammar_drawTableau (ot.get(), g, false, U"at+ma");
 }
 static void draw_NPA_faithful_anpa (Graphics g) {
-	OTGrammar ot = OTGrammar_create_NPA_grammar ();
+	autoOTGrammar ot = OTGrammar_create_NPA_grammar ();
 	ot -> index [1] = 3;
 	ot -> index [2] = 2;
 	ot -> index [3] = 1;
-	OTGrammar_drawTableau (ot, g, false, U"an+pa");
-	forget (ot);
+	OTGrammar_drawTableau (ot.get(), g, false, U"an+pa");
 }
 static void draw_NPA_faithful_atma (Graphics g) {
-	OTGrammar ot = OTGrammar_create_NPA_grammar ();
+	autoOTGrammar ot = OTGrammar_create_NPA_grammar ();
 	ot -> index [1] = 3;
 	ot -> index [2] = 2;
 	ot -> index [3] = 1;
-	OTGrammar_drawTableau (ot, g, false, U"at+ma");
-	forget (ot);
+	OTGrammar_drawTableau (ot.get(), g, false, U"at+ma");
 }
 static void draw_Wolof_ItI (Graphics g) {
-	OTGrammar ot = OTGrammar_create_tongueRoot_grammar (1, 4);
-	OTGrammar_drawTableau (ot, g, false, U"\\ict\\ic");
-	forget (ot);
+	autoOTGrammar ot = OTGrammar_create_tongueRoot_grammar (1, 4);
+	OTGrammar_drawTableau (ot.get(), g, false, U"\\ict\\ic");
 }
 static void draw_Wolof_itE (Graphics g) {
-	OTGrammar ot = OTGrammar_create_tongueRoot_grammar (1, 4);
-	OTGrammar_drawTableau (ot, g, false, U"it\\ef");
-	forget (ot);
+	autoOTGrammar ot = OTGrammar_create_tongueRoot_grammar (1, 4);
+	OTGrammar_drawTableau (ot.get(), g, false, U"it\\ef");
 }
 static void draw_Wolof_etE (Graphics g) {
-	OTGrammar ot = OTGrammar_create_tongueRoot_grammar (1, 4);
-	OTGrammar_drawTableau (ot, g, false, U"et\\ef");
-	forget (ot);
+	autoOTGrammar ot = OTGrammar_create_tongueRoot_grammar (1, 4);
+	OTGrammar_drawTableau (ot.get(), g, false, U"et\\ef");
 }
 static void draw_Wolof_schwatschwa (Graphics g) {
-	OTGrammar ot = OTGrammar_create_tongueRoot_grammar (1, 4);
-	OTGrammar_drawTableau (ot, g, false, U"\\swt\\sw");
-	forget (ot);
+	autoOTGrammar ot = OTGrammar_create_tongueRoot_grammar (1, 4);
+	OTGrammar_drawTableau (ot.get(), g, false, U"\\swt\\sw");
 }
 static void draw_Infant_swtI (Graphics g) {
-	OTGrammar ot = OTGrammar_create_tongueRoot_grammar (1, 3);
+	autoOTGrammar ot = OTGrammar_create_tongueRoot_grammar (1, 3);
 	ot -> constraints [1]. disharmony = 3;
 	ot -> constraints [2]. disharmony = 4;
 	ot -> constraints [3]. disharmony = 2;
 	ot -> constraints [4]. disharmony = 1;
 	ot -> constraints [5]. disharmony = 5;
-	OTGrammar_sort (ot);
-	OTGrammar_drawTableau (ot, g, false, U"\\swt\\ic");
-	forget (ot);
+	OTGrammar_sort (ot.get());
+	OTGrammar_drawTableau (ot.get(), g, false, U"\\swt\\ic");
 }
 
 void manual_gram_init (ManPages me);
diff --git a/gram/praat_gram.cpp b/gram/praat_gram.cpp
index dfd7ffb..3e42c30 100644
--- a/gram/praat_gram.cpp
+++ b/gram/praat_gram.cpp
@@ -63,7 +63,7 @@ DO
 		GET_REAL (U"Learning rate"), GET_REAL (U"left Weight range"), GET_REAL (U"right Weight range"), GET_REAL (U"Weight leak"),
 		GET_REAL (U"left x range"), GET_REAL (U"right x range"), GET_REAL (U"left y range"), GET_REAL (U"right y range"),
 		0, 0);
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
 FORM (Create_rectangular_Network, U"Create rectangular Network", 0) {
@@ -83,7 +83,7 @@ DO
 		GET_INTEGER (U"Number of rows"), GET_INTEGER (U"Number of columns"),
 		GET_INTEGER (U"Bottom row clamped"),
 		GET_REAL (U"left Initial weight range"), GET_REAL (U"right Initial weight range"));
-	praat_new (me.transfer(),
+	praat_new (me.move(),
 			U"rectangle_", GET_INTEGER (U"Number of rows"),
 			U"_", GET_INTEGER (U"Number of columns"));
 END2 }
@@ -105,7 +105,7 @@ DO
 		GET_INTEGER (U"Number of rows"), GET_INTEGER (U"Number of columns"),
 		GET_INTEGER (U"Bottom row clamped"),
 		GET_REAL (U"left Initial weight range"), GET_REAL (U"right Initial weight range"));
-	praat_new (me.transfer(),
+	praat_new (me.move(),
 			U"rectangle_", GET_INTEGER (U"Number of rows"),
 			U"_", GET_INTEGER (U"Number of columns"));
 END2 }
@@ -168,7 +168,7 @@ DO
 			GET_INTEGER (U"Include x"), GET_INTEGER (U"Include y"), GET_INTEGER (U"Position decimals"),
 			GET_INTEGER (U"Include clamped"),
 			GET_INTEGER (U"Include activity"), GET_INTEGER (U"Include excitation"), GET_INTEGER (U"Activity decimals"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -394,17 +394,17 @@ END2 }
 
 DIRECT2 (Create_NoCoda_grammar) {
 	autoOTGrammar me = OTGrammar_create_NoCoda_grammar ();
-	praat_new (me.transfer(), U"NoCoda");
+	praat_new (me.move(), U"NoCoda");
 END2 }
 
 DIRECT2 (Create_NPA_grammar) {
 	autoOTGrammar me = OTGrammar_create_NPA_grammar ();
-	praat_new (me.transfer(), U"assimilation");
+	praat_new (me.move(), U"assimilation");
 END2 }
 
 DIRECT2 (Create_NPA_distribution) {
 	autoPairDistribution me = OTGrammar_create_NPA_distribution ();
-	praat_new (me.transfer(), U"assimilation");
+	praat_new (me.move(), U"assimilation");
 END2 }
 
 FORM (Create_tongue_root_grammar, U"Create tongue-root grammar", U"Create tongue-root grammar...") {
@@ -419,7 +419,7 @@ FORM (Create_tongue_root_grammar, U"Create tongue-root grammar", U"Create tongue
 	OK2
 DO
 	autoOTGrammar me = OTGrammar_create_tongueRoot_grammar (GET_INTEGER (U"Constraint set"), GET_INTEGER (U"Ranking"));
-	praat_new (me.transfer(), GET_STRING (U"Ranking"));
+	praat_new (me.move(), GET_STRING (U"Ranking"));
 END2 }
 
 FORM (Create_metrics_grammar, U"Create metrics grammar", 0) {
@@ -442,11 +442,11 @@ FORM (Create_metrics_grammar, U"Create metrics grammar", 0) {
 	BOOLEAN (U"Include codas", 0)
 	OK2
 DO
-	praat_new (OTGrammar_create_metrics (GET_INTEGER (U"Initial ranking"), GET_INTEGER (U"Trochaicity constraint"),
+	autoOTGrammar me = OTGrammar_create_metrics (GET_INTEGER (U"Initial ranking"), GET_INTEGER (U"Trochaicity constraint"),
 		GET_INTEGER (U"Include FootBimoraic"), GET_INTEGER (U"Include FootBisyllabic"),
 		GET_INTEGER (U"Include Peripheral"), GET_INTEGER (U"Nonfinality constraint"),
-		GET_INTEGER (U"Overt forms have secondary stress"), GET_INTEGER (U"Include *Clash and *Lapse"), GET_INTEGER (U"Include codas")),
-		GET_STRING (U"Initial ranking"));
+		GET_INTEGER (U"Overt forms have secondary stress"), GET_INTEGER (U"Include *Clash and *Lapse"), GET_INTEGER (U"Include codas"));
+	praat_new (me.move(), GET_STRING (U"Initial ranking"));
 END2 }
 
 #pragma mark Save
@@ -707,7 +707,7 @@ DO
 	LOOP {
 		iam (OTGrammar);
 		autoStrings thee = OTGrammar_generateInputs (me, GET_INTEGER (U"Number of trials"));
-		praat_new (thee.transfer(), my name, U"_in");
+		praat_new (thee.move(), my name, U"_in");
 	}
 END2 }
 
@@ -715,7 +715,7 @@ DIRECT2 (OTGrammar_getInputs) {
 	LOOP {
 		iam (OTGrammar);
 		autoStrings thee = OTGrammar_getInputs (me);
-		praat_new (thee.transfer(), my name, U"_in");
+		praat_new (thee.move(), my name, U"_in");
 	}
 END2 }
 
@@ -723,7 +723,7 @@ DIRECT2 (OTGrammar_measureTypology) {
 	LOOP try {
 		iam (OTGrammar);
 		autoDistributions thee = OTGrammar_measureTypology (me);
-		praat_new (thee.transfer(), my name, U"_out");
+		praat_new (thee.move(), my name, U"_out");
 		praat_dataChanged (me);
 	} catch (MelderError) {
 		praat_dataChanged (OBJECT);
@@ -764,7 +764,7 @@ FORM (OTGrammar_inputToOutputs, U"OTGrammar: Input to outputs", U"OTGrammar: Inp
 DO
 	iam_ONLY (OTGrammar);
 	autoStrings thee = OTGrammar_inputToOutputs (me, GET_STRING (U"Input form"), GET_INTEGER (U"Trials"), GET_REAL (U"Evaluation noise"));
-	praat_new (thee.transfer(), my name, U"_out");
+	praat_new (thee.move(), my name, U"_out");
 	praat_dataChanged (me);
 END2 }
 
@@ -777,7 +777,7 @@ DO
 		iam (OTGrammar);
 		try {
 			autoDistributions thee = OTGrammar_to_Distribution (me, GET_INTEGER (U"Trials per input"), GET_REAL (U"Evaluation noise"));
-			praat_new (thee.transfer(), my name, U"_out");
+			praat_new (thee.move(), my name, U"_out");
 			praat_dataChanged (me);
 		} catch (MelderError) {
 			praat_dataChanged (me);
@@ -794,7 +794,7 @@ DO
 	LOOP try {
 		iam (OTGrammar);
 		autoPairDistribution thee = OTGrammar_to_PairDistribution (me, GET_INTEGER (U"Trials per input"), GET_REAL (U"Evaluation noise"));
-		praat_new (thee.transfer(), my name, U"_out");
+		praat_new (thee.move(), my name, U"_out");
 		praat_dataChanged (me);
 	} catch (MelderError) {
 		praat_dataChanged (OBJECT);
@@ -970,7 +970,7 @@ DO
 	iam_ONLY (OTGrammar);
 	thouart_ONLY (Strings);
 	autoStrings him = OTGrammar_inputsToOutputs (me, thee, GET_REAL (U"Evaluation noise"));
-	praat_new (him.transfer(), my name, U"_out");
+	praat_new (him.move(), my name, U"_out");
 	praat_dataChanged (me);
 END2 }
 
@@ -1023,7 +1023,7 @@ FORM (OTGrammar_Strings_learnFromPartialOutputs, U"OTGrammar: Learn from partial
 DO
 	iam_ONLY (OTGrammar);
 	thouart_ONLY (Strings);
-	OTHistory history = NULL;
+	autoOTHistory history;
 	try {
 		OTGrammar_learnFromPartialOutputs (me, thee,
 			GET_REAL (U"Evaluation noise"),
@@ -1037,7 +1037,7 @@ DO
 		Melder_flushError ();
 		// trickle down to save history
 	}
-	if (history) praat_new (history, my name);
+	if (history) praat_new (history.move(), my name);
 END2 }
 
 #pragma mark OTGRAMMAR & DISTRIBUTIONS
@@ -1072,7 +1072,7 @@ FORM (OTGrammar_Distributions_learnFromPartialOutputs, U"OTGrammar & Distributio
 DO
 	iam_ONLY (OTGrammar);
 	thouart_ONLY (Distributions);
-	OTHistory history = NULL;
+	autoOTHistory history;
 	try {
 		OTGrammar_Distributions_learnFromPartialOutputs (me, thee, GET_INTEGER (U"Column number"),
 			GET_REAL (U"Evaluation noise"),
@@ -1087,7 +1087,7 @@ DO
 		praat_dataChanged (me);
 		Melder_flushError ();
 	}
-	if (history) praat_new (history, my name);
+	if (history) praat_new (history.move(), my name);
 END2 }
 
 FORM (OTGrammar_Distributions_learnFromPartialOutputs_rrip, U"OTGrammar & Distributions: Learn from partial outputs (rrip)", U"OT learning 6. Shortcut to grammar learning") {
@@ -1106,7 +1106,7 @@ FORM (OTGrammar_Distributions_learnFromPartialOutputs_rrip, U"OTGrammar & Distri
 DO
 	iam_ONLY (OTGrammar);
 	thouart_ONLY (Distributions);
-	OTHistory history = NULL;
+	autoOTHistory history;
 	try {
 		OTGrammar_Distributions_learnFromPartialOutputs (me, thee, GET_INTEGER (U"Column number"),
 			GET_REAL (U"Evaluation noise"),
@@ -1121,7 +1121,7 @@ DO
 		praat_dataChanged (me);
 		Melder_flushError ();
 	}
-	if (history) praat_new (history, my name);
+	if (history) praat_new (history.move(), my name);
 END2 }
 
 FORM (OTGrammar_Distributions_learnFromPartialOutputs_eip, U"OTGrammar & Distributions: Learn from partial outputs (eip)", U"OT learning 6. Shortcut to grammar learning") {
@@ -1140,7 +1140,7 @@ FORM (OTGrammar_Distributions_learnFromPartialOutputs_eip, U"OTGrammar & Distrib
 DO
 	iam_ONLY (OTGrammar);
 	thouart_ONLY (Distributions);
-	OTHistory history = NULL;
+	autoOTHistory history;
 	try {
 		OTGrammar_Distributions_learnFromPartialOutputs (me, thee, GET_INTEGER (U"Column number"),
 			GET_REAL (U"Evaluation noise"),
@@ -1155,7 +1155,7 @@ DO
 		praat_dataChanged (me);
 		Melder_flushError ();
 	}
-	if (history) praat_new (history, my name);
+	if (history) praat_new (history.move(), my name);
 END2 }
 
 FORM (OTGrammar_Distributions_learnFromPartialOutputs_wrip, U"OTGrammar & Distributions: Learn from partial outputs (wrip)", U"OT learning 6. Shortcut to grammar learning") {
@@ -1174,7 +1174,7 @@ FORM (OTGrammar_Distributions_learnFromPartialOutputs_wrip, U"OTGrammar & Distri
 DO
 	iam_ONLY (OTGrammar);
 	thouart_ONLY (Distributions);
-	OTHistory history = NULL;
+	autoOTHistory history;
 	try {
 		OTGrammar_Distributions_learnFromPartialOutputs (me, thee, GET_INTEGER (U"Column number"),
 			GET_REAL (U"Evaluation noise"),
@@ -1189,7 +1189,7 @@ DO
 		praat_dataChanged (me);
 		Melder_flushError ();
 	}
-	if (history) praat_new (history, my name);
+	if (history) praat_new (history.move(), my name);
 END2 }
 
 FORM (OTGrammar_Distributions_listObligatoryRankings, U"OTGrammar & Distributions: Get fraction correct...", 0) {
@@ -1309,11 +1309,11 @@ FORM (Create_multi_level_metrics_grammar, U"Create multi-level metrics grammar",
 	BOOLEAN (U"Include codas", 0)
 	OK2
 DO
-	praat_new (OTMulti_create_metrics (GET_INTEGER (U"Initial ranking"), GET_INTEGER (U"Trochaicity constraint"),
+	autoOTMulti me = OTMulti_create_metrics (GET_INTEGER (U"Initial ranking"), GET_INTEGER (U"Trochaicity constraint"),
 		GET_INTEGER (U"Include FootBimoraic"), GET_INTEGER (U"Include FootBisyllabic"),
 		GET_INTEGER (U"Include Peripheral"), GET_INTEGER (U"Nonfinality constraint"),
-		GET_INTEGER (U"Overt forms have secondary stress"), GET_INTEGER (U"Include *Clash and *Lapse"), GET_INTEGER (U"Include codas")),
-		GET_STRING (U"Initial ranking"));
+		GET_INTEGER (U"Overt forms have secondary stress"), GET_INTEGER (U"Include *Clash and *Lapse"), GET_INTEGER (U"Include codas"));
+	praat_new (me.move(), GET_STRING (U"Initial ranking"));
 END2 }
 
 FORM (OTMulti_drawTableau, U"Draw tableau", U"OT learning") {
@@ -1372,7 +1372,7 @@ DO
 	iam_ONLY (OTMulti);
 	autoStrings thee = OTMulti_generateOptimalForms (me, GET_STRING (U"Partial form 1"), GET_STRING (U"Partial form 2"),
 		GET_INTEGER (U"Number of trials"), GET_REAL (U"Evaluation noise"));
-	praat_new (thee.transfer(), my name, U"_out");
+	praat_new (thee.move(), my name, U"_out");
 	praat_dataChanged (me);
 END2 }
 
@@ -1583,7 +1583,7 @@ DO
 		try {
 			autoDistributions thee = OTMulti_to_Distribution (me, GET_STRING (U"Partial form 1"), GET_STRING (U"Partial form 2"),
 				GET_INTEGER (U"Number of trials"), GET_REAL (U"Evaluation noise"));
-			praat_new (thee.transfer(), my name, U"_out");
+			praat_new (thee.move(), my name, U"_out");
 			praat_dataChanged (me);
 		} catch (MelderError) {
 			praat_dataChanged (me);
@@ -1609,7 +1609,7 @@ FORM (OTMulti_PairDistribution_learn, U"OTMulti & PairDistribution: Learn", 0) {
 DO
 	iam_ONLY (OTMulti);
 	thouart_ONLY (PairDistribution);
-	Table history = NULL;
+	autoTable history;
 	try {
 		OTMulti_PairDistribution_learn (me, thee,
 			GET_REAL (U"Evaluation noise"),
@@ -1625,7 +1625,7 @@ DO
 		Melder_flushError ();
 		// trickle down to save history
 	}
-	if (history) praat_new (history, my name);
+	if (history) praat_new (history.move(), my name);
 END2 }
 
 FORM (OTMulti_Strings_generateOptimalForms, U"OTGrammar: Inputs to outputs", U"OTGrammar: Inputs to outputs...") {
@@ -1635,7 +1635,7 @@ DO
 	iam_ONLY (OTMulti);
 	thouart_ONLY (Strings);
 	autoStrings him = OTMulti_Strings_generateOptimalForms (me, thee, GET_REAL (U"Evaluation noise"));
-	praat_new (him.transfer(), my name, U"_out");
+	praat_new (him.move(), my name, U"_out");
 	praat_dataChanged (me);
 END2 }
 
diff --git a/makefiles/makefile.defs.linuxs.alsa b/makefiles/makefile.defs.linuxs.alsa
deleted file mode 100644
index 850520b..0000000
--- a/makefiles/makefile.defs.linuxs.alsa
+++ /dev/null
@@ -1,23 +0,0 @@
-# File: makefile.defs.linuxc.alsa
-
-# System: Linux
-# Paul Boersma, 22 March 2014
-
-CC = gcc -std=gnu99
-
-CXX = g++ -std=c++11
-
-CFLAGS = -DNO_GRAPHICS -DUNIX -Dlinux -DALSA -D_FILE_OFFSET_BITS=64 -Werror=missing-prototypes -Werror=implicit -Wreturn-type -Wunused -Wunused-parameter -Wuninitialized -O1 -g1 -pthread
-
-CXXFLAGS = $(CFLAGS) -Wshadow
-
-LINK = g++
-
-EXECUTABLE = praat
-
-LIBS = -lm -lasound -lpthread
-
-AR = ar
-RANLIB = ls
-ICON =
-MAIN_ICON =
diff --git a/makefiles/makefile.defs.linuxs.pulse b/makefiles/makefile.defs.linuxs.pulse
new file mode 100644
index 0000000..d1519af
--- /dev/null
+++ b/makefiles/makefile.defs.linuxs.pulse
@@ -0,0 +1,23 @@
+# File: makefile.defs.linuxs.pulse
+
+# System: Linux
+# Paul Boersma, 4 November 2015
+
+CC = gcc -std=gnu99
+
+CXX = g++ -std=c++11
+
+CFLAGS = -DNO_GRAPHICS -DUNIX -Dlinux -DALSA -DHAVE_PULSEAUDIO -D_FILE_OFFSET_BITS=64 -Werror=missing-prototypes -Werror=implicit -Wreturn-type -Wunused -Wunused-parameter -Wuninitialized -O1 -g1 -pthread
+
+CXXFLAGS = $(CFLAGS) -Wshadow
+
+LINK = g++
+
+EXECUTABLE = praat
+
+LIBS = -lm -lasound -lpthread
+
+AR = ar
+RANLIB = ls
+ICON =
+MAIN_ICON =
diff --git a/stat/Distributions.cpp b/stat/Distributions.cpp
index dee29d4..d4da100 100644
--- a/stat/Distributions.cpp
+++ b/stat/Distributions.cpp
@@ -27,11 +27,11 @@ void structDistributions :: v_info () {
 	MelderInfo_writeLine (U"Number of values: ", numberOfRows);
 }
 
-Distributions Distributions_create (long numberOfRows, long numberOfColumns) {
+autoDistributions Distributions_create (long numberOfRows, long numberOfColumns) {
 	try {
 		autoDistributions me = Thing_new (Distributions);
 		TableOfReal_init (me.peek(), numberOfRows, numberOfColumns);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Distributions not created.");
 	}
@@ -130,23 +130,23 @@ static void unicize (Distributions me) {
 	my numberOfRows = nrow;
 }
 
-Distributions Distributions_addTwo (Distributions me, Distributions thee) {
+autoDistributions Distributions_addTwo (Distributions me, Distributions thee) {
 	try {
 		autoDistributions him = static_cast<Distributions> (TablesOfReal_append (me, thee));
 		TableOfReal_sortByLabel (him.peek(), 0, 0);
 		unicize (him.peek());
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (me, U" & ", thee, U": not added.");
 	}
 }
 
-Distributions Distributions_addMany (Collection me) {
+autoDistributions Distributions_addMany (Collection me) {
 	try {
 		autoDistributions thee = static_cast<Distributions> (TablesOfReal_appendMany (me));
 		TableOfReal_sortByLabel (thee.peek(), 0, 0);
 		unicize (thee.peek());
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (U"Distributions objects not added.");
 	}
diff --git a/stat/Distributions.h b/stat/Distributions.h
index 02e3047..e830e1c 100644
--- a/stat/Distributions.h
+++ b/stat/Distributions.h
@@ -27,15 +27,15 @@ Thing_define (Distributions, TableOfReal) {
 		override;
 };
 
-Distributions Distributions_create (long numberOfRows, long numberOfColumns);
+autoDistributions Distributions_create (long numberOfRows, long numberOfColumns);
 
 void Distributions_peek (Distributions me, long column, char32 **string, long *row);
 
 double Distributions_getProbability (Distributions me, const char32 *string, long column);
 double Distributionses_getMeanAbsoluteDifference (Distributions me, Distributions thee, long column);
 
-Distributions Distributions_addTwo (Distributions me, Distributions thee);
-Distributions Distributions_addMany (Collection me);
+autoDistributions Distributions_addTwo (Distributions me, Distributions thee);
+autoDistributions Distributions_addMany (Collection me);
 
 void Distributions_checkSpecifiedColumnNumberWithinRange (Distributions me, long columnNumber);
 
diff --git a/stat/Distributions_and_Strings.cpp b/stat/Distributions_and_Strings.cpp
index 052d07d..773bcad 100644
--- a/stat/Distributions_and_Strings.cpp
+++ b/stat/Distributions_and_Strings.cpp
@@ -26,7 +26,7 @@
 
 #include "Distributions_and_Strings.h"
 
-Strings Distributions_to_Strings (Distributions me, long column, long numberOfStrings) {
+autoStrings Distributions_to_Strings (Distributions me, long column, long numberOfStrings) {
 	try {
 		autoStrings thee = Thing_new (Strings);
 		thy numberOfStrings = numberOfStrings;
@@ -36,13 +36,13 @@ Strings Distributions_to_Strings (Distributions me, long column, long numberOfSt
 			Distributions_peek (me, column, & string, nullptr);
 			thy strings [istring] = Melder_dup (string);
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": Strings not generated.");
 	}
 }
 
-Strings Distributions_to_Strings_exact (Distributions me, long column) {
+autoStrings Distributions_to_Strings_exact (Distributions me, long column) {
 	try {
 		long total = 0;
 		long istring = 0;
@@ -73,13 +73,13 @@ Strings Distributions_to_Strings_exact (Distributions me, long column) {
 			}
 		}
 		Strings_randomize (thee.peek());
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": Strings not generated.");
 	}
 }
 
-Distributions Strings_to_Distributions (Strings me) {
+autoDistributions Strings_to_Distributions (Strings me) {
 	try {
 		autoDistributions thee = Distributions_create (my numberOfStrings, 1);
 		long idist = 0;
@@ -99,7 +99,7 @@ Distributions Strings_to_Distributions (Strings me) {
 		}
 		thy numberOfRows = idist;
 		TableOfReal_sortByLabel (thee.peek(), 1, 0);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": distribution not computed.");
 	}
diff --git a/stat/Distributions_and_Strings.h b/stat/Distributions_and_Strings.h
index 0df4795..0bc9d60 100644
--- a/stat/Distributions_and_Strings.h
+++ b/stat/Distributions_and_Strings.h
@@ -1,6 +1,6 @@
 /* Distributions_and_Strings.h
  *
- * Copyright (C) 1997-2011 Paul Boersma
+ * Copyright (C) 1997-2011,2015 Paul Boersma
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -20,8 +20,8 @@
 #include "Distributions.h"
 #include "Strings_.h"
 
-Strings Distributions_to_Strings (Distributions me, long column, long numberOfStrings);
-Strings Distributions_to_Strings_exact (Distributions me, long column);
-Distributions Strings_to_Distributions (Strings me);
+autoStrings Distributions_to_Strings (Distributions me, long column, long numberOfStrings);
+autoStrings Distributions_to_Strings_exact (Distributions me, long column);
+autoDistributions Strings_to_Distributions (Strings me);
 
 /* End of file Distributions_and_Strings.h */
diff --git a/stat/LogisticRegression.cpp b/stat/LogisticRegression.cpp
index e3fedc3..f65a2ae 100644
--- a/stat/LogisticRegression.cpp
+++ b/stat/LogisticRegression.cpp
@@ -73,19 +73,19 @@ void structLogisticRegression :: v_info () {
 	}
 }
 
-LogisticRegression LogisticRegression_create (const char32 *dependent1, const char32 *dependent2) {
+autoLogisticRegression LogisticRegression_create (const char32 *dependent1, const char32 *dependent2) {
 	try {
 		autoLogisticRegression me = Thing_new (LogisticRegression);
 		Regression_init (me.peek());
 		my dependent1 = Melder_dup (dependent1);
 		my dependent2 = Melder_dup (dependent2);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"LogisticRegression not created.");
 	}
 }
 
-static LogisticRegression _Table_to_LogisticRegression (Table me, long *factors, long numberOfFactors, long dependent1, long dependent2) {
+static autoLogisticRegression _Table_to_LogisticRegression (Table me, long *factors, long numberOfFactors, long dependent1, long dependent2) {
 	long numberOfParameters = numberOfFactors + 1;
 	long numberOfCells = my rows -> size, numberOfY0 = 0, numberOfY1 = 0, numberOfData = 0;
 	double logLikelihood = 1e308, previousLogLikelihood = 2e308;
@@ -269,10 +269,10 @@ static LogisticRegression _Table_to_LogisticRegression (Table me, long *factors,
 		parm -> value /= stdevX [ivar];
 		thy intercept -= parm -> value * meanX [ivar];
 	}
-	return thee.transfer();
+	return thee;
 }
 
-LogisticRegression Table_to_LogisticRegression (Table me, const char32 *factors_columnLabelString,
+autoLogisticRegression Table_to_LogisticRegression (Table me, const char32 *factors_columnLabelString,
 	const char32 *dependent1_columnLabel, const char32 *dependent2_columnLabel)
 {
 	try {
@@ -281,7 +281,7 @@ LogisticRegression Table_to_LogisticRegression (Table me, const char32 *factors_
 		long dependent1_columnIndex = Table_getColumnIndexFromColumnLabel (me, dependent1_columnLabel);
 		long dependent2_columnIndex = Table_getColumnIndexFromColumnLabel (me, dependent2_columnLabel);
 		autoLogisticRegression thee = _Table_to_LogisticRegression (me, factors_columnIndices.peek(), numberOfFactors, dependent1_columnIndex, dependent2_columnIndex);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": logistic regression not performed.");
 	}
@@ -352,7 +352,7 @@ void LogisticRegression_drawBoundary (LogisticRegression me, Graphics graphics,
 }
 
 /*
-Table Table_LogisticRegression_addProbabilities (Table me, LogisticRegression thee) {
+autoTable Table_LogisticRegression_addProbabilities (Table me, LogisticRegression thee) {
 	for (icell = 1; icell <= numberOfCells; icell ++) {
 		double fittedLogit = parameters [0], fittedP, fittedQ, fittedLogP, fittedLogQ;
 		for (ivar = 1; ivar <= numberOfIndependentVariables; ivar ++) {
diff --git a/stat/LogisticRegression.h b/stat/LogisticRegression.h
index 24c4fef..b6b293f 100644
--- a/stat/LogisticRegression.h
+++ b/stat/LogisticRegression.h
@@ -24,9 +24,9 @@
 #include "LogisticRegression_def.h"
 oo_CLASS_CREATE (LogisticRegression, Regression);
 
-LogisticRegression LogisticRegression_create (const char32 *dependent1, const char32 *dependent2);
+autoLogisticRegression LogisticRegression_create (const char32 *dependent1, const char32 *dependent2);
 
-LogisticRegression Table_to_LogisticRegression (Table me, const char32 *columnsWithFactors_string,
+autoLogisticRegression Table_to_LogisticRegression (Table me, const char32 *columnsWithFactors_string,
 	const char32 *columnWithDependent1_string, const char32 *columnWithDependent2_string);
 
 void LogisticRegression_drawBoundary (LogisticRegression me, Graphics graphics, long colx, double xmin, double xmax,
diff --git a/stat/PairDistribution.cpp b/stat/PairDistribution.cpp
index 68ad887..45e8d08 100644
--- a/stat/PairDistribution.cpp
+++ b/stat/PairDistribution.cpp
@@ -47,19 +47,19 @@ void structPairDistribution :: v_info () {
 	MelderInfo_writeLine (U"Number of pairs: ", pairs -> size);
 }
 
-PairProbability PairProbability_create (const char32 *string1, const char32 *string2, double weight) {
+autoPairProbability PairProbability_create (const char32 *string1, const char32 *string2, double weight) {
 	autoPairProbability me = Thing_new (PairProbability);
 	my string1 = Melder_dup (string1);
 	my string2 = Melder_dup (string2);
 	my weight = weight;
-	return me.transfer();
+	return me;
 }
 
-PairDistribution PairDistribution_create () {
+autoPairDistribution PairDistribution_create () {
 	try {
 		autoPairDistribution me = Thing_new (PairDistribution);
 		my pairs = Ordered_create ();
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"PairDistribution not created.");
 	}
@@ -103,8 +103,8 @@ double PairDistribution_getWeight (PairDistribution me, long pairNumber) {
 }
 
 void PairDistribution_add (PairDistribution me, const char32 *string1, const char32 *string2, double weight) {
-	PairProbability pair = PairProbability_create (string1, string2, weight);
-	Collection_addItem (my pairs, pair);
+	autoPairProbability pair = PairProbability_create (string1, string2, weight);
+	Collection_addItem (my pairs, pair.transfer());
 }
 
 void PairDistribution_removeZeroWeights (PairDistribution me) {
@@ -137,9 +137,8 @@ static double PairDistributions_getTotalWeight_checkPositive (PairDistribution m
 	return totalWeight;
 }
 
-void PairDistribution_to_Stringses (PairDistribution me, long nout, Strings *strings1_out, Strings *strings2_out) {
+void PairDistribution_to_Stringses (PairDistribution me, long nout, autoStrings *strings1_out, autoStrings *strings2_out) {
 	try {
-		*strings1_out = *strings2_out = nullptr;
 		long nin = my pairs -> size, iin;
 		if (nin < 1)
 			Melder_throw (U"No candidates.");
@@ -167,8 +166,8 @@ void PairDistribution_to_Stringses (PairDistribution me, long nout, Strings *str
 			strings1 -> strings [iout] = Melder_dup (prob -> string1);
 			strings2 -> strings [iout] = Melder_dup (prob -> string2);
 		}
-		*strings1_out = strings1.transfer();
-		*strings2_out = strings2.transfer();
+		*strings1_out = strings1.move();
+		*strings2_out = strings2.move();
 	} catch (MelderError) {
 		Melder_throw (me, U": generation of Stringses not performed.");
 	}
@@ -307,7 +306,7 @@ double PairDistribution_Distributions_getFractionCorrect (PairDistribution me, D
 	}
 }
 
-Table PairDistribution_to_Table (PairDistribution me) {
+autoTable PairDistribution_to_Table (PairDistribution me) {
 	try {
 		autoTable thee = Table_createWithColumnNames (my pairs -> size, U"string1 string2 weight");
 		for (long ipair = 1; ipair <= my pairs -> size; ipair ++) {
@@ -316,7 +315,7 @@ Table PairDistribution_to_Table (PairDistribution me) {
 			Table_setStringValue (thee.peek(), ipair, 2, prob -> string2);
 			Table_setNumericValue (thee.peek(), ipair, 3, prob -> weight);
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not converted to Table.");
 	}
diff --git a/stat/PairDistribution.h b/stat/PairDistribution.h
index b1e7fb6..9a7fd71 100644
--- a/stat/PairDistribution.h
+++ b/stat/PairDistribution.h
@@ -27,8 +27,8 @@
 oo_CLASS_CREATE (PairProbability, Daata);
 oo_CLASS_CREATE (PairDistribution, Daata);
 
-PairProbability PairProbability_create (const char32 *string1, const char32 *string2, double weight);
-PairDistribution PairDistribution_create ();
+autoPairProbability PairProbability_create (const char32 *string1, const char32 *string2, double weight);
+autoPairDistribution PairDistribution_create ();
 
 const char32 * PairDistribution_getString1 (PairDistribution me, long pairNumber);
 const char32 * PairDistribution_getString2 (PairDistribution me, long pairNumber);
@@ -36,7 +36,7 @@ double PairDistribution_getWeight (PairDistribution me, long pairNumber);
 
 void PairDistribution_add (PairDistribution me, const char32 *string1, const char32 *string2, double weight);
 void PairDistribution_removeZeroWeights (PairDistribution me);
-void PairDistribution_to_Stringses (PairDistribution me, long nout, Strings *strings1, Strings *strings2);
+void PairDistribution_to_Stringses (PairDistribution me, long nout, autoStrings *strings1, autoStrings *strings2);
 void PairDistribution_peekPair (PairDistribution me, char32 **string1, char32 **string2);
 
 void PairDistribution_swapInputsAndOutputs (PairDistribution me);
@@ -45,7 +45,7 @@ double PairDistribution_getFractionCorrect_maximumLikelihood (PairDistribution m
 double PairDistribution_getFractionCorrect_probabilityMatching (PairDistribution me);
 double PairDistribution_Distributions_getFractionCorrect (PairDistribution me, Distributions thee, long column);
 
-Table PairDistribution_to_Table (PairDistribution me);
+autoTable PairDistribution_to_Table (PairDistribution me);
 
 /* End of file PairDistribution.h */
 #endif
diff --git a/stat/Regression.cpp b/stat/Regression.cpp
index 783a5f8..bb3955f 100644
--- a/stat/Regression.cpp
+++ b/stat/Regression.cpp
@@ -92,17 +92,17 @@ long Regression_getFactorIndexFromFactorName_e (Regression me, const char32 *fac
 
 Thing_implement (LinearRegression, Regression, 0);
 
-LinearRegression LinearRegression_create () {
+autoLinearRegression LinearRegression_create () {
 	try {
 		autoLinearRegression me = Thing_new (LinearRegression);
 		Regression_init (me.peek());
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"LinearRegression not created.");
 	}
 }
 
-LinearRegression Table_to_LinearRegression (Table me) {
+autoLinearRegression Table_to_LinearRegression (Table me) {
 	try {
 		long numberOfIndependentVariables = my numberOfColumns - 1, numberOfParameters = my numberOfColumns;
 		long numberOfCells = my rows -> size, icell, ivar;
@@ -133,7 +133,7 @@ LinearRegression Table_to_LinearRegression (Table me) {
 			RegressionParameter parm = static_cast<RegressionParameter> (thy parameters -> item [ivar]);
 			parm -> value = x [ivar];
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": linear regression not performed.");
 	}
diff --git a/stat/Regression.h b/stat/Regression.h
index 76b4fe6..869e1f8 100644
--- a/stat/Regression.h
+++ b/stat/Regression.h
@@ -32,9 +32,9 @@ long Regression_getFactorIndexFromFactorName_e (Regression me, const char32 *fac
 Thing_define (LinearRegression, Regression) {
 };
 
-LinearRegression LinearRegression_create ();
+autoLinearRegression LinearRegression_create ();
 
-LinearRegression Table_to_LinearRegression (Table me);
+autoLinearRegression Table_to_LinearRegression (Table me);
 
 /* End of file Regression.h */
 #endif
diff --git a/stat/Table.cpp b/stat/Table.cpp
index 9d3b275..ca1bd56 100644
--- a/stat/Table.cpp
+++ b/stat/Table.cpp
@@ -132,11 +132,11 @@ void Table_initWithoutColumnNames (Table me, long numberOfRows, long numberOfCol
 	}
 }
 
-Table Table_createWithoutColumnNames (long numberOfRows, long numberOfColumns) {
+autoTable Table_createWithoutColumnNames (long numberOfRows, long numberOfColumns) {
 	try {
 		autoTable me = Thing_new (Table);
 		Table_initWithoutColumnNames (me.peek(), numberOfRows, numberOfColumns);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Table not created.");
 	}
@@ -151,11 +151,11 @@ void Table_initWithColumnNames (Table me, long numberOfRows, const char32 *colum
 	}
 }
 
-Table Table_createWithColumnNames (long numberOfRows, const char32 *columnNames) {
+autoTable Table_createWithColumnNames (long numberOfRows, const char32 *columnNames) {
 	try {
 		autoTable me = Thing_new (Table);
 		Table_initWithColumnNames (me.peek(), numberOfRows, columnNames);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Table not created.");
 	}
@@ -668,7 +668,7 @@ long Table_drawRowFromDistribution (Table me, long columnNumber) {
 	}
 }
 
-Table Table_extractRowsWhereColumn_number (Table me, long columnNumber, int which_Melder_NUMBER, double criterion) {
+autoTable Table_extractRowsWhereColumn_number (Table me, long columnNumber, int which_Melder_NUMBER, double criterion) {
 	try {
 		Table_checkSpecifiedColumnNumberWithinRange (me, columnNumber);
 		Table_numericize_Assert (me, columnNumber);   // extraction should work even if cells are not defined
@@ -686,13 +686,13 @@ Table Table_extractRowsWhereColumn_number (Table me, long columnNumber, int whic
 		if (thy rows -> size == 0) {
 			Melder_warning (U"No row matches criterion.");
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": rows not extracted.");
 	}
 }
 
-Table Table_extractRowsWhereColumn_string (Table me, long columnNumber, int which_Melder_STRING, const char32 *criterion) {
+autoTable Table_extractRowsWhereColumn_string (Table me, long columnNumber, int which_Melder_STRING, const char32 *criterion) {
 	try {
 		Table_checkSpecifiedColumnNumberWithinRange (me, columnNumber);
 		autoTable thee = Table_create (0, my numberOfColumns);
@@ -710,7 +710,7 @@ Table Table_extractRowsWhereColumn_string (Table me, long columnNumber, int whic
 		if (thy rows -> size == 0) {
 			Melder_warning (U"No row matches criterion.");
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": rows not extracted.");
 	}
@@ -732,7 +732,7 @@ static void Table_columns_checkCrossSectionEmpty (char32 **factors, long nfactor
 	}
 }
 
-Table Table_collapseRows (Table me, const char32 *factors_string, const char32 *columnsToSum_string,
+autoTable Table_collapseRows (Table me, const char32 *factors_string, const char32 *columnsToSum_string,
 	const char32 *columnsToAverage_string, const char32 *columnsToMedianize_string,
 	const char32 *columnsToAverageLogarithmically_string, const char32 *columnsToMedianizeLogarithmically_string)
 {
@@ -934,11 +934,10 @@ Table Table_collapseRows (Table me, const char32 *factors_string, const char32 *
 			irow = rowmax;
 		}
 		if (originalChanged) sortRowsByIndex_NoError (me);   // unsort the original table
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		if (originalChanged) sortRowsByIndex_NoError (me);   // unsort the original table   // UGLY
 		throw;
-		return NULL;
 	}
 }
 
@@ -970,14 +969,13 @@ static char32 ** _Table_getLevels (Table me, long column, long *numberOfLevels)
 	} catch (MelderError) {
 		sortRowsByIndex_NoError (me);   // unsort the original table   // UGLY
 		throw;
-		return NULL;
 	}
 }
 
-Table Table_rowsToColumns (Table me, const char32 *factors_string, long columnToTranspose, const char32 *columnsToExpand_string) {
+autoTable Table_rowsToColumns (Table me, const char32 *factors_string, long columnToTranspose, const char32 *columnsToExpand_string) {
 	bool originalChanged = false;
 	try {
-		Melder_assert (factors_string != NULL);
+		Melder_assert (factors_string);
 
 		long numberOfFactors = 0, numberToExpand = 0, numberOfLevels = 0;
 		bool warned = false;
@@ -1097,15 +1095,14 @@ Table Table_rowsToColumns (Table me, const char32 *factors_string, long columnTo
 			irow = rowmax;
 		}
 		if (originalChanged) sortRowsByIndex_NoError (me);   // unsort the original table
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		if (originalChanged) sortRowsByIndex_NoError (me);   // unsort the original table   // UGLY
 		throw;
-		return NULL;
 	}
 }
 
-Table Table_transpose (Table me) {
+autoTable Table_transpose (Table me) {
 	try {
 		autoTable thee = Table_createWithoutColumnNames (my numberOfColumns, 1 + my rows -> size);
 			for (long icol = 1; icol <= my numberOfColumns; icol ++) {
@@ -1116,7 +1113,7 @@ Table Table_transpose (Table me) {
 				Table_setStringValue (thee.peek(), icol, 1 + irow, Table_getStringValue_Assert (me, irow, icol));
 			}
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not transposed.");
 	}
@@ -1178,7 +1175,7 @@ void Table_reflectRows (Table me) {
 	}
 }
 
-Table Tables_append (Collection me) {
+autoTable Tables_append (Collection me) {
 	try {
 		if (my size == 0) Melder_throw (U"Cannot add zero tables.");
 		Table thee = static_cast <Table> (my item [1]);
@@ -1211,7 +1208,7 @@ Table Tables_append (Collection me) {
 				}
 			}
 		}
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (U"Table objects not appended.");
 	}
@@ -1689,24 +1686,24 @@ double Table_getGroupDifference_wilcoxonRankSum (Table me, long column, long gro
 	}
 	long n = n1 + n2;
 	if (n1 < 1 || n2 < 1 || n < 3) return NUMundefined;
-	Table ranks = Table_createWithoutColumnNames (n, 3);   // column 1 = group, 2 = value, 3 = rank
+	autoTable ranks = Table_createWithoutColumnNames (n, 3);   // column 1 = group, 2 = value, 3 = rank
 	for (long irow = 1, jrow = 0; irow <= my rows -> size; irow ++) {
 		TableRow row = static_cast <TableRow> (my rows -> item [irow]);
 		if (row -> cells [groupColumn]. string != NULL) {
 			if (str32equ (row -> cells [groupColumn]. string, group1)) {
-				Table_setNumericValue (ranks, ++ jrow, 1, 1.0);
-				Table_setNumericValue (ranks, jrow, 2, row -> cells [column]. number);
+				Table_setNumericValue (ranks.get(), ++ jrow, 1, 1.0);
+				Table_setNumericValue (ranks.get(), jrow, 2, row -> cells [column]. number);
 			} else if (str32equ (row -> cells [groupColumn]. string, group2)) {
-				Table_setNumericValue (ranks, ++ jrow, 1, 2.0);
-				Table_setNumericValue (ranks, jrow, 2, row -> cells [column]. number);
+				Table_setNumericValue (ranks.get(), ++ jrow, 1, 2.0);
+				Table_setNumericValue (ranks.get(), jrow, 2, row -> cells [column]. number);
 			}
 		}
 	}
-	Table_numericize_Assert (ranks, 1);
-	Table_numericize_Assert (ranks, 2);
-	Table_numericize_Assert (ranks, 3);
+	Table_numericize_Assert (ranks.get(), 1);
+	Table_numericize_Assert (ranks.get(), 2);
+	Table_numericize_Assert (ranks.get(), 3);
 	long columns [1+1] = { 0, 2 };   // we're gonna sort by column 2
-	Table_sortRows_Assert (ranks, columns, 1);   // we sort by one column only
+	Table_sortRows_Assert (ranks.get(), columns, 1);   // we sort by one column only
 	double totalNumberOfTies3 = 0.0;
 	for (long irow = 1; irow <= ranks -> rows -> size; irow ++) {
 		TableRow row = static_cast <TableRow> (ranks -> rows -> item [irow]);
@@ -1720,12 +1717,12 @@ double Table_getGroupDifference_wilcoxonRankSum (Table me, long column, long gro
 		rowOfLastTie --;
 		double averageRank = 0.5 * ((double) irow + (double) rowOfLastTie);
 		for (long jrow = irow; jrow <= rowOfLastTie; jrow ++) {
-			Table_setNumericValue (ranks, jrow, 3, averageRank);
+			Table_setNumericValue (ranks.get(), jrow, 3, averageRank);
 		}
 		long numberOfTies = rowOfLastTie - irow + 1;
 		totalNumberOfTies3 += (double) (numberOfTies - 1) * (double) numberOfTies * (double) (numberOfTies + 1);
 	}
-	Table_numericize_Assert (ranks, 3);
+	Table_numericize_Assert (ranks.get(), 3);
 	double maximumRankSum = (double) n1 * (double) n2, rankSum = 0.0;
 	for (long irow = 1; irow <= ranks -> rows -> size; irow ++) {
 		TableRow row = static_cast <TableRow> (ranks -> rows -> item [irow]);
@@ -1735,7 +1732,6 @@ double Table_getGroupDifference_wilcoxonRankSum (Table me, long column, long gro
 	double stdev = sqrt (maximumRankSum * ((double) n + 1.0 - totalNumberOfTies3 / n / (n - 1)) / 12.0);
 	if (out_rankSum) *out_rankSum = rankSum;
 	if (out_significanceFromZero) *out_significanceFromZero = NUMgaussQ (fabs (rankSum - 0.5 * maximumRankSum) / stdev);
-	forget (ranks);
 	return rankSum / maximumRankSum;
 }
 
@@ -1928,8 +1924,7 @@ void Table_writeToCommaSeparatedFile (Table me, MelderFile file) {
 	}
 }
 
-Table Table_readFromTableFile (MelderFile file) {
-	Table me = NULL;
+autoTable Table_readFromTableFile (MelderFile file) {
 	try {
 		autostring32 string = MelderFile_readText (file);
 		long nrow, ncol, nelements;
@@ -1972,7 +1967,7 @@ Table Table_readFromTableFile (MelderFile file) {
 		 * Create empty table.
 		 */
 		nrow = nelements / ncol - 1;
-		me = Table_create (nrow, ncol);
+		autoTable me = Table_create (nrow, ncol);
 
 		/*
 		 * Read elements.
@@ -1983,7 +1978,7 @@ Table Table_readFromTableFile (MelderFile file) {
 			static MelderString buffer { 0 };
 			MelderString_empty (& buffer);
 			while (*p != U' ' && *p != U'\t' && *p != U'\n') { MelderString_appendCharacter (& buffer, *p); p ++; }
-			Table_setColumnLabel (me, icol, buffer.string);
+			Table_setColumnLabel (me.get(), icol, buffer.string);
 			MelderString_empty (& buffer);
 		}
 		for (long irow = 1; irow <= nrow; irow ++) {
@@ -1999,12 +1994,11 @@ Table Table_readFromTableFile (MelderFile file) {
 		}
 		return me;
 	} catch (MelderError) {
-		forget (me);
 		Melder_throw (U"Table object not read from space-separated text file ", file, U".");
 	}
 }
 
-Table Table_readFromCharacterSeparatedTextFile (MelderFile file, char32 separator) {
+autoTable Table_readFromCharacterSeparatedTextFile (MelderFile file, char32 separator) {
 	try {
 		autostring32 string = MelderFile_readText (file);
 
@@ -2080,7 +2074,7 @@ Table Table_readFromCharacterSeparatedTextFile (MelderFile file, char32 separato
 				row -> cells [icol]. string = Melder_dup (buffer.string);   // BUG? could be NULL
 			}
 		}
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Table object not read from character-separated text file ", file, U".");
 	}
diff --git a/stat/Table.h b/stat/Table.h
index 14bc982..e224851 100644
--- a/stat/Table.h
+++ b/stat/Table.h
@@ -28,12 +28,12 @@ oo_CLASS_CREATE (TableRow, Daata);
 oo_CLASS_CREATE (Table, Daata);
 
 void Table_initWithColumnNames (Table me, long numberOfRows, const char32 *columnNames);
-Table Table_createWithColumnNames (long numberOfRows, const char32 *columnNames);
+autoTable Table_createWithColumnNames (long numberOfRows, const char32 *columnNames);
 void Table_initWithoutColumnNames (Table me, long numberOfRows, long numberOfColumns);
-Table Table_createWithoutColumnNames (long numberOfRows, long numberOfColumns);
+autoTable Table_createWithoutColumnNames (long numberOfRows, long numberOfColumns);
 #define Table_create Table_createWithoutColumnNames
 
-Table Tables_append (Collection me);
+autoTable Tables_append (Collection me);
 void Table_appendRow (Table me);
 void Table_appendColumn (Table me, const char32 *label);
 void Table_appendSumColumn (Table me, long column1, long column2, const char32 *label);
@@ -110,16 +110,16 @@ void Table_drawEllipse_e (Table me, Graphics g, long xcolumn, long ycolumn,
 void Table_list (Table me, bool includeRowNumbers);
 void Table_writeToTabSeparatedFile (Table me, MelderFile file);
 void Table_writeToCommaSeparatedFile (Table me, MelderFile file);
-Table Table_readFromTableFile (MelderFile file);
-Table Table_readFromCharacterSeparatedTextFile (MelderFile file, char32 separator);
+autoTable Table_readFromTableFile (MelderFile file);
+autoTable Table_readFromCharacterSeparatedTextFile (MelderFile file, char32 separator);
 
-Table Table_extractRowsWhereColumn_number (Table me, long column, int which_Melder_NUMBER, double criterion);
-Table Table_extractRowsWhereColumn_string (Table me, long column, int which_Melder_STRING, const char32 *criterion);
-Table Table_collapseRows (Table me, const char32 *factors_string, const char32 *columnsToSum_string,
+autoTable Table_extractRowsWhereColumn_number (Table me, long column, int which_Melder_NUMBER, double criterion);
+autoTable Table_extractRowsWhereColumn_string (Table me, long column, int which_Melder_STRING, const char32 *criterion);
+autoTable Table_collapseRows (Table me, const char32 *factors_string, const char32 *columnsToSum_string,
 	const char32 *columnsToAverage_string, const char32 *columnsToMedianize_string,
 	const char32 *columnsToAverageLogarithmically_string, const char32 *columnsToMedianizeLogarithmically_string);
-Table Table_rowsToColumns (Table me, const char32 *factors_string, long columnToTranspose, const char32 *columnsToExpand_string);
-Table Table_transpose (Table me);
+autoTable Table_rowsToColumns (Table me, const char32 *factors_string, long columnToTranspose, const char32 *columnsToExpand_string);
+autoTable Table_transpose (Table me);
 
 void Table_checkSpecifiedRowNumberWithinRange (Table me, long rowNumber);
 void Table_checkSpecifiedColumnNumberWithinRange (Table me, long columnNumber);
diff --git a/stat/TableEditor.cpp b/stat/TableEditor.cpp
index 3a87e23..3b8a97a 100644
--- a/stat/TableEditor.cpp
+++ b/stat/TableEditor.cpp
@@ -270,7 +270,7 @@ void structTableEditor :: v_createHelpMenuItems (EditorMenu menu) {
 	EditorMenu_addCommand (menu, U"TableEditor help", U'?', menu_cb_TableEditorHelp);
 }
 
-TableEditor TableEditor_create (const char32 *title, Table table) {
+autoTableEditor TableEditor_create (const char32 *title, Table table) {
 	try {
 		autoTableEditor me = Thing_new (TableEditor);
 		Editor_init (me.peek(), 0, 0, 700, 500, title, table);
@@ -290,7 +290,7 @@ TableEditor TableEditor_create (const char32 *title, Table table) {
 		Graphics_setFontSize (my graphics, 12);
 		Graphics_setUnderscoreIsSubscript (my graphics, false);
 		Graphics_setAtSignIsLink (my graphics, true);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"TableEditor not created.");
 	}
diff --git a/stat/TableEditor.h b/stat/TableEditor.h
index bd0dc92..734af53 100644
--- a/stat/TableEditor.h
+++ b/stat/TableEditor.h
@@ -47,7 +47,7 @@ Thing_define (TableEditor, Editor) {
 	virtual int v_click (double xWC, double yWC, bool shiftKeyPressed);
 };
 
-TableEditor TableEditor_create (const char32 *title, Table table);
+autoTableEditor TableEditor_create (const char32 *title, Table table);
 
 /* End of file TableEditor.h */
 #endif
diff --git a/stat/TableOfReal.cpp b/stat/TableOfReal.cpp
index c825f2c..d9ece0f 100644
--- a/stat/TableOfReal.cpp
+++ b/stat/TableOfReal.cpp
@@ -123,11 +123,11 @@ void TableOfReal_init (TableOfReal me, long numberOfRows, long numberOfColumns)
 	my data = NUMmatrix <double> (1, my numberOfRows, 1, my numberOfColumns);
 }
 
-TableOfReal TableOfReal_create (long numberOfRows, long numberOfColumns) {
+autoTableOfReal TableOfReal_create (long numberOfRows, long numberOfColumns) {
 	try {
 		autoTableOfReal me = Thing_new (TableOfReal);
 		TableOfReal_init (me.peek(), numberOfRows, numberOfColumns);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"TableOfReal not created.");
 	}
@@ -359,7 +359,7 @@ static void copyColumn (TableOfReal me, long myCol, TableOfReal thee, long thyCo
 	}
 }
 
-TableOfReal TableOfReal_extractRowsWhereColumn (TableOfReal me, long column, int which_Melder_NUMBER, double criterion) {
+autoTableOfReal TableOfReal_extractRowsWhereColumn (TableOfReal me, long column, int which_Melder_NUMBER, double criterion) {
 	try {
 		if (column < 1 || column > my numberOfColumns)
 			Melder_throw (U"No such column: ", column, U".");
@@ -376,13 +376,13 @@ TableOfReal TableOfReal_extractRowsWhereColumn (TableOfReal me, long column, int
 		for (long irow = 1; irow <= my numberOfRows; irow ++)
 			if (Melder_numberMatchesCriterion (my data [irow] [column], which_Melder_NUMBER, criterion))
 				copyRow (me, irow, thee.peek(), ++ n);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": rows not extracted.");
 	}
 }
 
-TableOfReal TableOfReal_extractRowsWhereLabel (TableOfReal me, int which_Melder_STRING, const char32 *criterion) {
+autoTableOfReal TableOfReal_extractRowsWhereLabel (TableOfReal me, int which_Melder_STRING, const char32 *criterion) {
 	try {
 		long n = 0;
 		for (long irow = 1; irow <= my numberOfRows; irow ++) {
@@ -398,13 +398,13 @@ TableOfReal TableOfReal_extractRowsWhereLabel (TableOfReal me, int which_Melder_
 		for (long irow = 1; irow <= my numberOfRows; irow ++)
 			if (Melder_stringMatchesCriterion (my rowLabels [irow], which_Melder_STRING, criterion))
 				copyRow (me, irow, thee.peek(), ++ n);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": rows not extracted.");
 	}
 }
 
-TableOfReal TableOfReal_extractColumnsWhereRow (TableOfReal me, long row, int which_Melder_NUMBER, double criterion) {
+autoTableOfReal TableOfReal_extractColumnsWhereRow (TableOfReal me, long row, int which_Melder_NUMBER, double criterion) {
 	try {
 		if (row < 1 || row > my numberOfRows)
 			Melder_throw (U"No such row: ", row, U".");
@@ -422,13 +422,13 @@ TableOfReal TableOfReal_extractColumnsWhereRow (TableOfReal me, long row, int wh
 		for (long icol = 1; icol <= my numberOfColumns; icol ++)
 			if (Melder_numberMatchesCriterion (my data [row] [icol], which_Melder_NUMBER, criterion))
 				copyColumn (me, icol, thee.peek(), ++ n);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": columns not extracted.");
 	}
 }
 
-TableOfReal TableOfReal_extractColumnsWhereLabel (TableOfReal me, int which_Melder_STRING, const char32 *criterion) {
+autoTableOfReal TableOfReal_extractColumnsWhereLabel (TableOfReal me, int which_Melder_STRING, const char32 *criterion) {
 	try {
 		long n = 0;
 		for (long icol = 1; icol <= my numberOfColumns; icol ++) {
@@ -446,7 +446,7 @@ TableOfReal TableOfReal_extractColumnsWhereLabel (TableOfReal me, int which_Meld
 				copyColumn (me, icol, thee.peek(), ++ n);
 			}
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": columns not extracted.");
 	}
@@ -537,7 +537,7 @@ static long *getElementsOfRanges (const char32 *ranges, long maximumElement, lon
 	return elements.transfer();
 }
 
-TableOfReal TableOfReal_extractRowRanges (TableOfReal me, const char32 *ranges) {
+autoTableOfReal TableOfReal_extractRowRanges (TableOfReal me, const char32 *ranges) {
 	try {
 		long numberOfElements;
 		autoNUMvector <long> elements (getElementsOfRanges (ranges, my numberOfRows, & numberOfElements, U"row"), 1);
@@ -545,13 +545,13 @@ TableOfReal TableOfReal_extractRowRanges (TableOfReal me, const char32 *ranges)
 		copyColumnLabels (me, thee.peek());
 		for (long ielement = 1; ielement <= numberOfElements; ielement ++)
 			copyRow (me, elements [ielement], thee.peek(), ielement);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": row ranges not extracted.");
 	}
 }
 
-TableOfReal TableOfReal_extractColumnRanges (TableOfReal me, const char32 *ranges) {
+autoTableOfReal TableOfReal_extractColumnRanges (TableOfReal me, const char32 *ranges) {
 	try {
 		long numberOfElements;
 		autoNUMvector <long> elements (getElementsOfRanges (ranges, my numberOfColumns, & numberOfElements, U"column"), 1);
@@ -559,13 +559,13 @@ TableOfReal TableOfReal_extractColumnRanges (TableOfReal me, const char32 *range
 		copyRowLabels (me, thee.peek());
 		for (long ielement = 1; ielement <= numberOfElements; ielement ++)
 			copyColumn (me, elements [ielement], thee.peek(), ielement);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": column ranges not extracted.");
 	}
 }
 
-TableOfReal TableOfReal_extractRowsWhere (TableOfReal me, const char32 *condition, Interpreter interpreter) {
+autoTableOfReal TableOfReal_extractRowsWhere (TableOfReal me, const char32 *condition, Interpreter interpreter) {
 	try {
 		Formula_compile (interpreter, me, condition, kFormula_EXPRESSION_TYPE_NUMERIC, true);
 		/*
@@ -603,13 +603,13 @@ TableOfReal TableOfReal_extractRowsWhere (TableOfReal me, const char32 *conditio
 				}
 			}
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": rows not extracted.");
 	}
 }
 
-TableOfReal TableOfReal_extractColumnsWhere (TableOfReal me, const char32 *condition, Interpreter interpreter) {
+autoTableOfReal TableOfReal_extractColumnsWhere (TableOfReal me, const char32 *condition, Interpreter interpreter) {
 	try {
 		Formula_compile (interpreter, me, condition, kFormula_EXPRESSION_TYPE_NUMERIC, true);
 		/*
@@ -647,7 +647,7 @@ TableOfReal TableOfReal_extractColumnsWhere (TableOfReal me, const char32 *condi
 				}
 			}
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": columns not extracted.");
 	}
@@ -655,7 +655,7 @@ TableOfReal TableOfReal_extractColumnsWhere (TableOfReal me, const char32 *condi
 
 /***** EXTRACT *****/
 
-Strings TableOfReal_extractRowLabelsAsStrings (TableOfReal me) {
+autoStrings TableOfReal_extractRowLabelsAsStrings (TableOfReal me) {
 	try {
 		autoStrings thee = Thing_new (Strings);
 		thy strings = NUMvector <char32 *> (1, my numberOfRows);
@@ -663,13 +663,13 @@ Strings TableOfReal_extractRowLabelsAsStrings (TableOfReal me) {
 		for (long irow = 1; irow <= my numberOfRows; irow ++) {
 			thy strings [irow] = Melder_dup (my rowLabels [irow] ? my rowLabels [irow] : U"");
 		}
-		return thee.transfer();	
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": row labels not extracted.");
 	}
 }
 
-Strings TableOfReal_extractColumnLabelsAsStrings (TableOfReal me) {
+autoStrings TableOfReal_extractColumnLabelsAsStrings (TableOfReal me) {
 	try {
 		autoStrings thee = Thing_new (Strings);
 		thy strings = NUMvector <char32 *> (1, my numberOfColumns);
@@ -677,7 +677,7 @@ Strings TableOfReal_extractColumnLabelsAsStrings (TableOfReal me) {
 		for (long icol = 1; icol <= my numberOfColumns; icol ++) {
 			thy strings [icol] = Melder_dup (my columnLabels [icol] ? my columnLabels [icol] : U"");
 		}
-		return thee.transfer();	
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": column labels not extracted.");
 	}
@@ -1050,7 +1050,7 @@ void TableOfReal_sortByColumn (TableOfReal me, long column1, long column2) {
 	TableOfReal_sort (me, false, column1, column2);
 }
 
-TableOfReal Table_to_TableOfReal (Table me, long labelColumn) {
+autoTableOfReal Table_to_TableOfReal (Table me, long labelColumn) {
 	try {
 		if (labelColumn < 1 || labelColumn > my numberOfColumns) labelColumn = 0;
 		autoTableOfReal thee = TableOfReal_create (my rows -> size, labelColumn ? my numberOfColumns - 1 : my numberOfColumns);
@@ -1089,13 +1089,13 @@ TableOfReal Table_to_TableOfReal (Table me, long labelColumn) {
 				}
 			}
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not converted to TableOfReal.");
 	}
 }
 
-Table TableOfReal_to_Table (TableOfReal me, const char32 *labelOfFirstColumn) {
+autoTable TableOfReal_to_Table (TableOfReal me, const char32 *labelOfFirstColumn) {
 	try {
 		autoTable thee = Table_createWithoutColumnNames (my numberOfRows, my numberOfColumns + 1);
 		Table_setColumnLabel (thee.peek(), 1, labelOfFirstColumn);
@@ -1112,7 +1112,7 @@ Table TableOfReal_to_Table (TableOfReal me, const char32 *labelOfFirstColumn) {
 				row -> cells [icol + 1]. string = Melder_dup (Melder_double (numericValue));
 			}
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not converted to Table.");
 	}
@@ -1144,7 +1144,7 @@ void TableOfReal_writeToHeaderlessSpreadsheetFile (TableOfReal me, MelderFile fi
 	}
 }
 
-TableOfReal TableOfReal_readFromHeaderlessSpreadsheetFile (MelderFile file) {
+autoTableOfReal TableOfReal_readFromHeaderlessSpreadsheetFile (MelderFile file) {
 	try {
 		autostring32 string = MelderFile_readText (file);
 		long nrow, ncol, nelements;
@@ -1225,7 +1225,7 @@ TableOfReal TableOfReal_readFromHeaderlessSpreadsheetFile (MelderFile file) {
 				my data [irow] [icol] = Melder_atof (buffer.string);   // if cell contains a string, this will be 0
 			}
 		}
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"TableOfReal: tab-separated file ", file, U" not read.");
 	}
diff --git a/stat/TableOfReal.h b/stat/TableOfReal.h
index 853fe70..91b6de0 100644
--- a/stat/TableOfReal.h
+++ b/stat/TableOfReal.h
@@ -29,7 +29,7 @@
 oo_CLASS_CREATE (TableOfReal, Daata);
 
 void TableOfReal_init (TableOfReal me, long numberOfRows, long numberOfColumns);
-TableOfReal TableOfReal_create (long numberOfRows, long numberOfColumns);
+autoTableOfReal TableOfReal_create (long numberOfRows, long numberOfColumns);
 void TableOfReal_removeRow (TableOfReal me, long irow);
 void TableOfReal_removeColumn (TableOfReal me, long icol);
 void TableOfReal_insertRow (TableOfReal me, long irow);
@@ -41,8 +41,8 @@ long TableOfReal_columnLabelToIndex (TableOfReal me, const char32 *label /* catt
 double TableOfReal_getColumnMean (TableOfReal me, long icol);
 double TableOfReal_getColumnStdev (TableOfReal me, long icol);
 
-TableOfReal Table_to_TableOfReal (Table me, long labelColumn);
-Table TableOfReal_to_Table (TableOfReal me, const char32 *labelOfFirstColumn);
+autoTableOfReal Table_to_TableOfReal (Table me, long labelColumn);
+autoTable TableOfReal_to_Table (TableOfReal me, const char32 *labelOfFirstColumn);
 void TableOfReal_formula (TableOfReal me, const char32 *expression, Interpreter interpreter, TableOfReal target);
 void TableOfReal_drawAsNumbers (TableOfReal me, Graphics g, long rowmin, long rowmax, int iformat, int precision);
 void TableOfReal_drawAsNumbers_if (TableOfReal me, Graphics g, long rowmin, long rowmax, int iformat, int precision,
@@ -60,22 +60,22 @@ void TableOfReal_sortByLabel (TableOfReal me, long column1, long column2);
 void TableOfReal_sortByColumn (TableOfReal me, long column1, long column2);
 
 void TableOfReal_writeToHeaderlessSpreadsheetFile (TableOfReal me, MelderFile file);
-TableOfReal TableOfReal_readFromHeaderlessSpreadsheetFile (MelderFile file);
+autoTableOfReal TableOfReal_readFromHeaderlessSpreadsheetFile (MelderFile file);
 
-TableOfReal TableOfReal_extractRowRanges (TableOfReal me, const char32 *ranges);
-TableOfReal TableOfReal_extractColumnRanges (TableOfReal me, const char32 *ranges);
+autoTableOfReal TableOfReal_extractRowRanges (TableOfReal me, const char32 *ranges);
+autoTableOfReal TableOfReal_extractColumnRanges (TableOfReal me, const char32 *ranges);
 
-TableOfReal TableOfReal_extractRowsWhereColumn (TableOfReal me, long icol, int which_Melder_NUMBER, double criterion);
-TableOfReal TableOfReal_extractColumnsWhereRow (TableOfReal me, long icol, int which_Melder_NUMBER, double criterion);
+autoTableOfReal TableOfReal_extractRowsWhereColumn (TableOfReal me, long icol, int which_Melder_NUMBER, double criterion);
+autoTableOfReal TableOfReal_extractColumnsWhereRow (TableOfReal me, long icol, int which_Melder_NUMBER, double criterion);
 
-TableOfReal TableOfReal_extractRowsWhereLabel (TableOfReal me, int which_Melder_STRING, const char32 *criterion);
-TableOfReal TableOfReal_extractColumnsWhereLabel (TableOfReal me, int which_Melder_STRING, const char32 *criterion);
+autoTableOfReal TableOfReal_extractRowsWhereLabel (TableOfReal me, int which_Melder_STRING, const char32 *criterion);
+autoTableOfReal TableOfReal_extractColumnsWhereLabel (TableOfReal me, int which_Melder_STRING, const char32 *criterion);
 
-TableOfReal TableOfReal_extractRowsWhere (TableOfReal me, const char32 *condition, Interpreter interpreter);
-TableOfReal TableOfReal_extractColumnsWhere (TableOfReal me, const char32 *condition, Interpreter interpreter);
+autoTableOfReal TableOfReal_extractRowsWhere (TableOfReal me, const char32 *condition, Interpreter interpreter);
+autoTableOfReal TableOfReal_extractColumnsWhere (TableOfReal me, const char32 *condition, Interpreter interpreter);
 
-Strings TableOfReal_extractRowLabelsAsStrings (TableOfReal me);
-Strings TableOfReal_extractColumnLabelsAsStrings (TableOfReal me);
+autoStrings TableOfReal_extractRowLabelsAsStrings (TableOfReal me);
+autoStrings TableOfReal_extractColumnLabelsAsStrings (TableOfReal me);
 
 /* End of file TableOfReal.h */
 #endif
diff --git a/stat/praat_Stat.cpp b/stat/praat_Stat.cpp
index 372c46d..bb778de 100644
--- a/stat/praat_Stat.cpp
+++ b/stat/praat_Stat.cpp
@@ -44,21 +44,21 @@ static const char32 * Table_messageColumn (Table me, long column) {
 DIRECT2 (Distributionses_add) {
 	autoCollection me = praat_getSelectedObjects ();
 	autoDistributions thee = Distributions_addMany (me.peek());
-	praat_new (thee.transfer(), U"added");
+	praat_new (thee.move(), U"added");
 END2 }
 
-FORM (Distributionses_getMeanAbsoluteDifference, U"Get mean difference", 0) {
+FORM (Distributionses_getMeanAbsoluteDifference, U"Get mean difference", nullptr) {
 	NATURAL (U"Column number", U"1")
 	OK2
 DO
-	Distributions me = NULL, thee = NULL;
+	Distributions me = nullptr, thee = nullptr;
 	LOOP {
 		(me ? thee : me) = (Distributions) OBJECT;
 	}
 	Melder_informationReal (Distributionses_getMeanAbsoluteDifference (me, thee, GET_INTEGER (U"Column number")), NULL);
 END2 }
 
-FORM (Distributions_getProbability, U"Get probability", 0) {
+FORM (Distributions_getProbability, U"Get probability", nullptr) {
 	NATURAL (U"Column number", U"1")
 	SENTENCE (U"String", U"")
 	OK2
@@ -66,7 +66,7 @@ DO
 	LOOP {
 		iam (Distributions);
 		double probability = Distributions_getProbability (me, GET_STRING (U"String"), GET_INTEGER (U"Column number"));
-		Melder_informationReal (probability, NULL);
+		Melder_informationReal (probability, nullptr);
 	}
 END2 }
 
@@ -74,7 +74,7 @@ DIRECT2 (Distributions_help) {
 	Melder_help (U"Distributions");
 END2 }
 
-FORM (Distributions_to_Strings, U"To Strings", 0) {
+FORM (Distributions_to_Strings, U"To Strings", nullptr) {
 	NATURAL (U"Column number", U"1")
 	NATURAL (U"Number of strings", U"1000")
 	OK2
@@ -82,18 +82,18 @@ DO
 	LOOP {
 		iam (Distributions);
 		autoStrings thee = Distributions_to_Strings (me, GET_INTEGER (U"Column number"), GET_INTEGER (U"Number of strings"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
-FORM (Distributions_to_Strings_exact, U"To Strings (exact)", 0) {
+FORM (Distributions_to_Strings_exact, U"To Strings (exact)", nullptr) {
 	NATURAL (U"Column number", U"1")
 	OK2
 DO
 	LOOP {
 		iam (Distributions);
 		autoStrings thee = Distributions_to_Strings_exact (me, GET_INTEGER (U"Column number"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -101,14 +101,14 @@ END2 }
 #pragma mark -
 #pragma mark LOGISTICREGRESSION
 
-FORM (LogisticRegression_drawBoundary, U"LogisticRegression: Draw boundary", 0) {
+FORM (LogisticRegression_drawBoundary, U"LogisticRegression: Draw boundary", nullptr) {
 	WORD (U"Horizontal factor", U"")
 	REAL (U"left Horizontal range", U"0.0")
 	REAL (U"right Horizontal range", U"0.0 (= auto)")
 	WORD (U"Vertical factor", U"")
 	REAL (U"left Vertical range", U"0.0")
 	REAL (U"right Vertical range", U"0.0 (= auto)")
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	autoPraatPicture picture;
@@ -131,7 +131,7 @@ DIRECT2 (PairDistribution_getFractionCorrect_maximumLikelihood) {
 	LOOP {
 		iam (PairDistribution);
 		double fractionCorrect = PairDistribution_getFractionCorrect_maximumLikelihood (me);
-		Melder_informationReal (fractionCorrect, NULL);
+		Melder_informationReal (fractionCorrect, nullptr);
 	}
 END2 }
 
@@ -139,7 +139,7 @@ DIRECT2 (PairDistribution_getFractionCorrect_probabilityMatching) {
 	LOOP {
 		iam (PairDistribution);
 		double fractionCorrect = PairDistribution_getFractionCorrect_probabilityMatching (me);
-		Melder_informationReal (fractionCorrect, NULL);
+		Melder_informationReal (fractionCorrect, nullptr);
 	}
 END2 }
 
@@ -150,7 +150,7 @@ DIRECT2 (PairDistribution_getNumberOfPairs) {
 	}
 END2 }
 
-FORM (PairDistribution_getString1, U"Get string1", 0) {
+FORM (PairDistribution_getString1, U"Get string1", nullptr) {
 	NATURAL (U"Pair number", U"1")
 	OK2
 DO
@@ -161,7 +161,7 @@ DO
 	}
 END2 }
 
-FORM (PairDistribution_getString2, U"Get string2", 0) {
+FORM (PairDistribution_getString2, U"Get string2", nullptr) {
 	NATURAL (U"Pair number", U"1")
 	OK2
 DO
@@ -172,7 +172,7 @@ DO
 	}
 END2 }
 
-FORM (PairDistribution_getWeight, U"Get weight", 0) {
+FORM (PairDistribution_getWeight, U"Get weight", nullptr) {
 	NATURAL (U"Pair number", U"1")
 	OK2
 DO
@@ -203,7 +203,7 @@ DIRECT2 (PairDistribution_swapInputsAndOutputs) {
 	}
 END2 }
 
-FORM (PairDistribution_to_Stringses, U"Generate two Strings objects", 0) {
+FORM (PairDistribution_to_Stringses, U"Generate two Strings objects", nullptr) {
 	NATURAL (U"Number", U"1000")
 	SENTENCE (U"Name of first Strings", U"input")
 	SENTENCE (U"Name of second Strings", U"output")
@@ -211,11 +211,10 @@ FORM (PairDistribution_to_Stringses, U"Generate two Strings objects", 0) {
 DO
 	LOOP {
 		iam (PairDistribution);
-		Strings strings1_, strings2_;
-		PairDistribution_to_Stringses (me, GET_INTEGER (U"Number"), & strings1_, & strings2_);
-		autoStrings strings1 = strings1_, strings2 = strings2_;   // UGLY
-		praat_new (strings1.transfer(), GET_STRING (U"Name of first Strings"));
-		praat_new (strings2.transfer(), GET_STRING (U"Name of second Strings"));
+		autoStrings strings1, strings2;
+		PairDistribution_to_Stringses (me, GET_INTEGER (U"Number"), & strings1, & strings2);
+		praat_new (strings1.move(), GET_STRING (U"Name of first Strings"));
+		praat_new (strings2.move(), GET_STRING (U"Name of second Strings"));
 	}
 END2 }
 
@@ -223,7 +222,7 @@ DIRECT2 (PairDistribution_to_Table) {
 	LOOP {
 		iam (PairDistribution);
 		autoTable thee = PairDistribution_to_Table (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -231,7 +230,7 @@ END2 }
 #pragma mark -
 #pragma mark PAIRDISTRIBUTION & DISTRIBUTIONS
 
-FORM (PairDistribution_Distributions_getFractionCorrect, U"PairDistribution & Distributions: Get fraction correct", 0) {
+FORM (PairDistribution_Distributions_getFractionCorrect, U"PairDistribution & Distributions: Get fraction correct", nullptr) {
 	NATURAL (U"Column", U"1")
 	OK2
 DO
@@ -257,10 +256,10 @@ DIRECT2 (Tables_append) {
 		Collection_addItem (collection.peek(), me);
 	}
 	autoTable thee = Tables_append (collection.peek());
-	praat_new (thee.transfer(), U"appended");
+	praat_new (thee.move(), U"appended");
 END2 }
 
-FORM (Table_appendColumn, U"Table: Append column", 0) {
+FORM (Table_appendColumn, U"Table: Append column", nullptr) {
 	WORD (U"Label", U"newcolumn")
 	OK2
 DO
@@ -271,7 +270,7 @@ DO
 	}
 END2 }
 
-FORM (Table_appendDifferenceColumn, U"Table: Append difference column", 0) {
+FORM (Table_appendDifferenceColumn, U"Table: Append difference column", nullptr) {
 	WORD (U"left Columns", U"")
 	WORD (U"right Columns", U"")
 	WORD (U"Label", U"diff")
@@ -286,7 +285,7 @@ DO
 	}
 END2 }
 
-FORM (Table_appendProductColumn, U"Table: Append product column", 0) {
+FORM (Table_appendProductColumn, U"Table: Append product column", nullptr) {
 	WORD (U"left Columns", U"")
 	WORD (U"right Columns", U"")
 	WORD (U"Label", U"diff")
@@ -301,7 +300,7 @@ DO
 	}
 END2 }
 
-FORM (Table_appendQuotientColumn, U"Table: Append quotient column", 0) {
+FORM (Table_appendQuotientColumn, U"Table: Append quotient column", nullptr) {
 	WORD (U"left Columns", U"")
 	WORD (U"right Columns", U"")
 	WORD (U"Label", U"diff")
@@ -316,7 +315,7 @@ DO
 	}
 END2 }
 
-FORM (Table_appendSumColumn, U"Table: Append sum column", 0) {
+FORM (Table_appendSumColumn, U"Table: Append sum column", nullptr) {
 	WORD (U"left Columns", U"")
 	WORD (U"right Columns", U"")
 	WORD (U"Label", U"diff")
@@ -339,7 +338,7 @@ DIRECT2 (Table_appendRow) {
 	}
 END2 }
 
-FORM (Table_collapseRows, U"Table: Collapse rows", 0) {
+FORM (Table_collapseRows, U"Table: Collapse rows", nullptr) {
 	LABEL (U"", U"Columns with factors (independent variables):")
 	TEXTFIELD (U"factors", U"speaker dialect age vowel")
 	LABEL (U"", U"Columns to sum:")
@@ -361,11 +360,11 @@ DO
 			GET_STRING (U"factors"), GET_STRING (U"columnsToSum"),
 			GET_STRING (U"columnsToAverage"), GET_STRING (U"columnsToMedianize"),
 			GET_STRING (U"columnsToAverageLogarithmically"), GET_STRING (U"columnsToMedianizeLogarithmically"));
-		praat_new (thee.transfer(), my name, U"_pooled");
+		praat_new (thee.move(), my name, U"_pooled");
 	}
 END2 }
 
-FORM (Table_createWithColumnNames, U"Create Table with column names", 0) {
+FORM (Table_createWithColumnNames, U"Create Table with column names", nullptr) {
 	WORD (U"Name", U"table")
 	INTEGER (U"Number of rows", U"10")
 	LABEL (U"", U"Column names:")
@@ -373,20 +372,20 @@ FORM (Table_createWithColumnNames, U"Create Table with column names", 0) {
 	OK2
 DO
 	autoTable me = Table_createWithColumnNames (GET_INTEGER (U"Number of rows"), GET_STRING (U"columnNames"));
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
-FORM (Table_createWithoutColumnNames, U"Create Table without column names", 0) {
+FORM (Table_createWithoutColumnNames, U"Create Table without column names", nullptr) {
 	WORD (U"Name", U"table")
 	INTEGER (U"Number of rows", U"10")
 	NATURAL (U"Number of columns", U"3")
 	OK2
 DO
 	autoTable me = Table_createWithoutColumnNames (GET_INTEGER (U"Number of rows"), GET_INTEGER (U"Number of columns"));
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
-FORM (Table_drawEllipse, U"Draw ellipse (standard deviation)", 0) {
+FORM (Table_drawEllipse, U"Draw ellipse (standard deviation)", nullptr) {
 	WORD (U"Horizontal column", U"")
 	REAL (U"left Horizontal range", U"0.0")
 	REAL (U"right Horizontal range", U"0.0 (= auto)")
@@ -409,7 +408,7 @@ DO
 	}
 END2 }
 
-FORM (Table_drawRowFromDistribution, U"Table: Draw row from distribution", 0) {
+FORM (Table_drawRowFromDistribution, U"Table: Draw row from distribution", nullptr) {
 	WORD (U"Column with distribution", U"")
 	OK2
 DO
@@ -430,7 +429,7 @@ DIRECT2 (Table_edit) {
 	}
 END2 }
 
-FORM (Table_extractRowsWhereColumn_number, U"Table: Extract rows where column (number)", 0) {
+FORM (Table_extractRowsWhereColumn_number, U"Table: Extract rows where column (number)", nullptr) {
 	WORD (U"Extract all rows where column...", U"")
 	RADIO_ENUM (U"...is...", kMelder_number, DEFAULT)
 	REAL (U"...the number", U"0.0")
@@ -441,12 +440,12 @@ DO
 		iam (Table);
 		long icol = Table_getColumnIndexFromColumnLabel (me, GET_STRING (U"Extract all rows where column..."));
 		autoTable thee = Table_extractRowsWhereColumn_number (me, icol, GET_ENUM (kMelder_number, U"...is..."), value);
-		praat_new (thee.transfer(), my name, U"_", Table_messageColumn (static_cast <Table> OBJECT, icol), U"_", NUMdefined (value) ? Melder_integer (lround (value)) : U"undefined");
+		praat_new (thee.move(), my name, U"_", Table_messageColumn (static_cast <Table> OBJECT, icol), U"_", NUMdefined (value) ? Melder_integer (lround (value)) : U"undefined");
 		praat_dataChanged (me);   // WHY?
 	}
 END2 }
 
-FORM (Table_extractRowsWhereColumn_text, U"Table: Extract rows where column (text)", 0) {
+FORM (Table_extractRowsWhereColumn_text, U"Table: Extract rows where column (text)", nullptr) {
 	WORD (U"Extract all rows where column...", U"")
 	OPTIONMENU_ENUM (U"...", kMelder_string, DEFAULT)
 	SENTENCE (U"...the text", U"hi")
@@ -457,7 +456,7 @@ DO
 		iam (Table);
 		long icol = Table_getColumnIndexFromColumnLabel (me, GET_STRING (U"Extract all rows where column..."));
 		autoTable thee = Table_extractRowsWhereColumn_string (me, icol, GET_ENUM (kMelder_string, U"..."), value);
-		praat_new (thee.transfer(), my name, U"_", value);
+		praat_new (thee.move(), my name, U"_", value);
 		praat_dataChanged (me);   // WHY?
 	}
 END2 }
@@ -500,7 +499,7 @@ DO
 	}
 END2 }
 
-FORM (Table_getColumnIndex, U"Table: Get column index", 0) {
+FORM (Table_getColumnIndex, U"Table: Get column index", nullptr) {
 	SENTENCE (U"Column label", U"")
 	OK2
 DO
@@ -510,7 +509,7 @@ DO
 	}
 END2 }
 
-FORM (Table_getColumnLabel, U"Table: Get column label", 0) {
+FORM (Table_getColumnLabel, U"Table: Get column label", nullptr) {
 	NATURAL (U"Column number", U"1")
 	OK2
 DO
@@ -522,7 +521,7 @@ DO
 	}
 END2 }
 
-FORM (Table_getGroupMean, U"Table: Get group mean", 0) {
+FORM (Table_getGroupMean, U"Table: Get group mean", nullptr) {
 	WORD (U"Column label", U"salary")
 	WORD (U"Group column", U"gender")
 	SENTENCE (U"Group", U"F")
@@ -536,7 +535,7 @@ DO
 	}
 END2 }
 
-FORM (Table_getMaximum, U"Table: Get maximum", 0) {
+FORM (Table_getMaximum, U"Table: Get maximum", nullptr) {
 	SENTENCE (U"Column label", U"")
 	OK2
 DO
@@ -548,7 +547,7 @@ DO
 	}
 END2 }
 
-FORM (Table_getMean, U"Table: Get mean", 0) {
+FORM (Table_getMean, U"Table: Get mean", nullptr) {
 	SENTENCE (U"Column label", U"")
 	OK2
 DO
@@ -560,7 +559,7 @@ DO
 	}
 END2 }
 
-FORM (Table_getMinimum, U"Table: Get minimum", 0) {
+FORM (Table_getMinimum, U"Table: Get minimum", nullptr) {
 	SENTENCE (U"Column label", U"")
 	OK2
 DO
@@ -572,7 +571,7 @@ DO
 	}
 END2 }
 
-FORM (Table_getQuantile, U"Table: Get quantile", 0) {
+FORM (Table_getQuantile, U"Table: Get quantile", nullptr) {
 	SENTENCE (U"Column label", U"")
 	POSITIVE (U"Quantile", U"0.50 (= median)")
 	OK2
@@ -585,7 +584,7 @@ DO
 	}
 END2 }
 
-FORM (Table_getStandardDeviation, U"Table: Get standard deviation", 0) {
+FORM (Table_getStandardDeviation, U"Table: Get standard deviation", nullptr) {
 	SENTENCE (U"Column label", U"")
 	OK2
 DO
@@ -611,7 +610,7 @@ DIRECT2 (Table_getNumberOfRows) {
 	}
 END2 }
 
-FORM (Table_getValue, U"Table: Get value", 0) {
+FORM (Table_getValue, U"Table: Get value", nullptr) {
 	NATURAL (U"Row number", U"1")
 	WORD (U"Column label", U"")
 	OK2
@@ -629,7 +628,7 @@ DIRECT2 (Table_help) {
 	Melder_help (U"Table");
 END2 }
 
-FORM (Table_insertColumn, U"Table: Insert column", 0) {
+FORM (Table_insertColumn, U"Table: Insert column", nullptr) {
 	NATURAL (U"Position", U"1")
 	WORD (U"Label", U"newcolumn")
 	OK2
@@ -641,7 +640,7 @@ DO
 	}
 END2 }
 
-FORM (Table_insertRow, U"Table: Insert row", 0) {
+FORM (Table_insertRow, U"Table: Insert row", nullptr) {
 	NATURAL (U"Position", U"1")
 	OK2
 DO
@@ -652,7 +651,7 @@ DO
 	}
 END2 }
 
-FORM (Table_list, U"Table: List", 0) {
+FORM (Table_list, U"Table: List", nullptr) {
 	BOOLEAN (U"Include row numbers", true)
 	OK2
 DO
@@ -662,19 +661,22 @@ DO
 	}
 END2 }
 
-FORM_READ2 (Table_readFromTableFile, U"Read Table from table file", 0, true) {
-	praat_newWithFile (Table_readFromTableFile (file), file, MelderFile_name (file));
+FORM_READ2 (Table_readFromTableFile, U"Read Table from table file", nullptr, true) {
+	autoTable me = Table_readFromTableFile (file);
+	praat_newWithFile (me.move(), file, MelderFile_name (file));
 END2 }
 
-FORM_READ2 (Table_readFromCommaSeparatedFile, U"Read Table from comma-separated file", 0, true) {
-	praat_newWithFile (Table_readFromCharacterSeparatedTextFile (file, ','), file, MelderFile_name (file));
+FORM_READ2 (Table_readFromCommaSeparatedFile, U"Read Table from comma-separated file", nullptr, true) {
+	autoTable me = Table_readFromCharacterSeparatedTextFile (file, U',');
+	praat_newWithFile (me.move(), file, MelderFile_name (file));
 END2 }
 
-FORM_READ2 (Table_readFromTabSeparatedFile, U"Read Table from tab-separated file", 0, true) {
-	praat_newWithFile (Table_readFromCharacterSeparatedTextFile (file, '\t'), file, MelderFile_name (file));
+FORM_READ2 (Table_readFromTabSeparatedFile, U"Read Table from tab-separated file", nullptr, true) {
+	autoTable me = Table_readFromCharacterSeparatedTextFile (file, U'\t');
+	praat_newWithFile (me.move(), file, MelderFile_name (file));
 END2 }
 
-FORM (Table_removeColumn, U"Table: Remove column", 0) {
+FORM (Table_removeColumn, U"Table: Remove column", nullptr) {
 	WORD (U"Column label", U"")
 	OK2
 DO
@@ -686,7 +688,7 @@ DO
 	}
 END2 }
 
-FORM (Table_removeRow, U"Table: Remove row", 0) {
+FORM (Table_removeRow, U"Table: Remove row", nullptr) {
 	NATURAL (U"Row number", U"1")
 	OK2
 DO
@@ -916,11 +918,11 @@ DO
 		iam (Table);
 		long icol = Table_getColumnIndexFromColumnLabel (me, columnLabel);
 		autoTable thee = Table_rowsToColumns (me, GET_STRING (U"factors"), icol, GET_STRING (U"columnsToExpand"));
-		praat_new (thee.transfer(), NAME, U"_nested");
+		praat_new (thee.move(), NAME, U"_nested");
 	}
 END2 }
 
-FORM (Table_scatterPlot, U"Scatter plot", 0) {
+FORM (Table_scatterPlot, U"Scatter plot", nullptr) {
 	WORD (U"Horizontal column", U"")
 	REAL (U"left Horizontal range", U"0.0")
 	REAL (U"right Horizontal range", U"0.0 (= auto)")
@@ -929,7 +931,7 @@ FORM (Table_scatterPlot, U"Scatter plot", 0) {
 	REAL (U"right Vertical range", U"0.0 (= auto)")
 	WORD (U"Column with marks", U"")
 	NATURAL (U"Font size", U"12")
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Garnish", true)
 	OK2
 DO
 	autoPraatPicture picture;
@@ -945,7 +947,7 @@ DO
 	}
 END2 }
 
-FORM (Table_scatterPlot_mark, U"Scatter plot (marks)", 0) {
+FORM (Table_scatterPlot_mark, U"Scatter plot (marks)", nullptr) {
 	WORD (U"Horizontal column", U"")
 	REAL (U"left Horizontal range", U"0.0")
 	REAL (U"right Horizontal range", U"0.0 (= auto)")
@@ -953,7 +955,7 @@ FORM (Table_scatterPlot_mark, U"Scatter plot (marks)", 0) {
 	REAL (U"left Vertical range", U"0.0")
 	REAL (U"right Vertical range", U"0.0 (= auto)")
 	POSITIVE (U"Mark size (mm)", U"1.0")
-	BOOLEAN (U"Garnish", 1)
+	BOOLEAN (U"Garnish", true)
 	SENTENCE (U"Mark string (+xo.)", U"+")
 	OK2
 DO
@@ -969,7 +971,7 @@ DO
 	}
 END2 }
 
-FORM (Table_searchColumn, U"Table: Search column", 0) {
+FORM (Table_searchColumn, U"Table: Search column", nullptr) {
 	WORD (U"Column label", U"")
 	WORD (U"Value", U"")
 	OK2
@@ -981,7 +983,7 @@ DO
 	}
 END2 }
 	
-FORM (Table_setColumnLabel_index, U"Set column label", 0) {
+FORM (Table_setColumnLabel_index, U"Set column label", nullptr) {
 	NATURAL (U"Column number", U"1")
 	SENTENCE (U"Label", U"")
 	OK2
@@ -993,7 +995,7 @@ DO
 	}
 END2 }
 
-FORM (Table_setColumnLabel_label, U"Set column label", 0) {
+FORM (Table_setColumnLabel_label, U"Set column label", nullptr) {
 	SENTENCE (U"Old label", U"")
 	SENTENCE (U"New label", U"")
 	OK2
@@ -1005,7 +1007,7 @@ DO
 	}
 END2 }
 
-FORM (Table_setNumericValue, U"Table: Set numeric value", 0) {
+FORM (Table_setNumericValue, U"Table: Set numeric value", nullptr) {
 	NATURAL (U"Row number", U"1")
 	WORD (U"Column label", U"")
 	REAL_OR_UNDEFINED (U"Numeric value", U"1.5")
@@ -1019,7 +1021,7 @@ DO
 	}
 END2 }
 
-FORM (Table_setStringValue, U"Table: Set string value", 0) {
+FORM (Table_setStringValue, U"Table: Set string value", nullptr) {
 	NATURAL (U"Row number", U"1")
 	WORD (U"Column label", U"")
 	SENTENCE (U"String value", U"xx")
@@ -1049,7 +1051,7 @@ DIRECT2 (Table_reflectRows) {
 	}
 END2 }
 
-FORM (Table_sortRows, U"Table: Sort rows", 0) {
+FORM (Table_sortRows, U"Table: Sort rows", nullptr) {
 	LABEL (U"", U"One or more column labels for sorting:")
 	TEXTFIELD (U"columnLabels", U"dialect gender name")
 	OK2
@@ -1065,11 +1067,11 @@ DIRECT2 (Table_to_LinearRegression) {
 	LOOP {
 		iam (Table);
 		autoLinearRegression thee = Table_to_LinearRegression (me);
-		praat_new (thee.transfer(), NAME);
+		praat_new (thee.move(), NAME);
 	}
 END2 }
 
-FORM (Table_to_LogisticRegression, U"Table: To LogisticRegression", 0) {
+FORM (Table_to_LogisticRegression, U"Table: To LogisticRegression", nullptr) {
 	LABEL (U"", U"Factors (column names):")
 	TEXTFIELD (U"factors", U"F0 F1 duration")
 	WORD (U"Dependent 1 (column name)", U"e")
@@ -1079,11 +1081,11 @@ DO
 	LOOP {
 		iam (Table);
 		autoLogisticRegression thee = Table_to_LogisticRegression (me, GET_STRING (U"factors"), GET_STRING (U"Dependent 1"), GET_STRING (U"Dependent 2"));
-		praat_new (thee.transfer(), NAME);
+		praat_new (thee.move(), NAME);
 	}
 END2 }
 
-FORM (Table_to_TableOfReal, U"Table: Down to TableOfReal", 0) {
+FORM (Table_to_TableOfReal, U"Table: Down to TableOfReal", nullptr) {
 	WORD (U"Column for row labels", U"")
 	OK2
 DO
@@ -1091,7 +1093,7 @@ DO
 		iam (Table);
 		long icol = Table_findColumnIndexFromColumnLabel (me, GET_STRING (U"Column for row labels"));
 		autoTableOfReal thee = Table_to_TableOfReal (me, icol);
-		praat_new (thee.transfer(), NAME);
+		praat_new (thee.move(), NAME);
 	}
 END2 }
 
@@ -1099,7 +1101,7 @@ DIRECT2 (Table_transpose) {
 	LOOP {
 		iam (Table);
 		autoTable thee = Table_transpose (me);
-		praat_new (thee.transfer(), NAME, U"_transposed");
+		praat_new (thee.move(), NAME, U"_transposed");
 	}
 END2 }
 
@@ -1129,20 +1131,20 @@ DIRECT2 (TablesOfReal_append) {
 		Collection_addItem (tables.peek(), me);
 	}
 	autoTableOfReal thee = static_cast <TableOfReal> (TablesOfReal_appendMany (tables.peek()));
-	praat_new (thee.transfer(), U"appended");
+	praat_new (thee.move(), U"appended");
 END2 }
 
-FORM (TableOfReal_create, U"Create TableOfReal", 0) {
+FORM (TableOfReal_create, U"Create TableOfReal", nullptr) {
 	WORD (U"Name", U"table")
 	NATURAL (U"Number of rows", U"10")
 	NATURAL (U"Number of columns", U"3")
 	OK2
 DO
 	autoTableOfReal me = TableOfReal_create (GET_INTEGER (U"Number of rows"), GET_INTEGER (U"Number of columns"));
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
-FORM (TableOfReal_drawAsNumbers, U"Draw as numbers", 0) {
+FORM (TableOfReal_drawAsNumbers, U"Draw as numbers", nullptr) {
 	NATURAL (U"From row", U"1")
 	INTEGER (U"To row", U"0 (= all)")
 	RADIO (U"Format", 3)
@@ -1162,7 +1164,7 @@ DO
 	}
 END2 }
 
-FORM (TableOfReal_drawAsNumbers_if, U"Draw as numbers if...", 0) {
+FORM (TableOfReal_drawAsNumbers_if, U"Draw as numbers if...", nullptr) {
 	NATURAL (U"From row", U"1")
 	INTEGER (U"To row", U"0 (= all)")
 	RADIO (U"Format", 3)
@@ -1184,7 +1186,7 @@ DO
 	}
 END2 }
 
-FORM (TableOfReal_drawAsSquares, U"Draw table as squares", 0) {
+FORM (TableOfReal_drawAsSquares, U"Draw table as squares", nullptr) {
 	INTEGER (U"From row", U"1")
 	INTEGER (U"To row", U"0")
 	INTEGER (U"From column", U"1")
@@ -1202,7 +1204,7 @@ DO
 	}
 END2 }
 
-FORM (TableOfReal_drawHorizontalLines, U"Draw horizontal lines", 0) {
+FORM (TableOfReal_drawHorizontalLines, U"Draw horizontal lines", nullptr) {
 	NATURAL (U"From row", U"1")
 	INTEGER (U"To row", U"0 (= all)")
 	OK2
@@ -1214,7 +1216,7 @@ DO
 	}
 END2 }
 
-FORM (TableOfReal_drawLeftAndRightLines, U"Draw left and right lines", 0) {
+FORM (TableOfReal_drawLeftAndRightLines, U"Draw left and right lines", nullptr) {
 	NATURAL (U"From row", U"1")
 	INTEGER (U"To row", U"0 (= all)")
 	OK2
@@ -1226,7 +1228,7 @@ DO
 	}
 END2 }
 
-FORM (TableOfReal_drawTopAndBottomLines, U"Draw top and bottom lines", 0) {
+FORM (TableOfReal_drawTopAndBottomLines, U"Draw top and bottom lines", nullptr) {
 	NATURAL (U"From row", U"1")
 	INTEGER (U"To row", U"0 (= all)")
 	OK2
@@ -1238,7 +1240,7 @@ DO
 	}
 END2 }
 
-FORM (TableOfReal_drawVerticalLines, U"Draw vertical lines", 0) {
+FORM (TableOfReal_drawVerticalLines, U"Draw vertical lines", nullptr) {
 	NATURAL (U"From row", U"1")
 	INTEGER (U"To row", U"0 (= all)")
 	OK2
@@ -1254,11 +1256,11 @@ DIRECT2 (TableOfReal_extractColumnLabelsAsStrings) {
 	LOOP {
 		iam (TableOfReal);
 		autoStrings thee = TableOfReal_extractColumnLabelsAsStrings (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
-FORM (TableOfReal_extractColumnRanges, U"Extract column ranges", 0) {
+FORM (TableOfReal_extractColumnRanges, U"Extract column ranges", nullptr) {
 	LABEL (U"", U"Create a new TableOfReal from the following columns:")
 	TEXTFIELD (U"ranges", U"1 2")
 	LABEL (U"", U"To supply rising or falling ranges, use e.g. 2:6 or 5:3.")
@@ -1267,11 +1269,11 @@ DO
 	LOOP {
 		iam (TableOfReal);
 		autoTableOfReal thee = TableOfReal_extractColumnRanges (me, GET_STRING (U"ranges"));
-		praat_new (thee.transfer(), my name, U"_cols");
+		praat_new (thee.move(), my name, U"_cols");
 	}
 END2 }
 
-FORM (TableOfReal_extractColumnsWhere, U"Extract columns where", 0) {
+FORM (TableOfReal_extractColumnsWhere, U"Extract columns where", nullptr) {
 	LABEL (U"", U"Extract all columns with at least one cell where:")
 	TEXTFIELD (U"condition", U"col mod 3 = 0 ; this example extracts every third column")
 	OK2
@@ -1279,11 +1281,11 @@ DO
 	LOOP {
 		iam (TableOfReal);
 		autoTableOfReal thee = TableOfReal_extractColumnsWhere (me, GET_STRING (U"condition"), interpreter);
-		praat_new (thee.transfer(), my name, U"_cols");
+		praat_new (thee.move(), my name, U"_cols");
 	}
 END2 }
 
-FORM (TableOfReal_extractColumnsWhereLabel, U"Extract column where label", 0) {
+FORM (TableOfReal_extractColumnsWhereLabel, U"Extract column where label", nullptr) {
 	OPTIONMENU_ENUM (U"Extract all columns whose label...", kMelder_string, DEFAULT)
 	SENTENCE (U"...the text", U"a")
 	OK2
@@ -1292,11 +1294,11 @@ DO
 	LOOP {
 		iam (TableOfReal);
 		autoTableOfReal thee = TableOfReal_extractColumnsWhereLabel (me, GET_ENUM (kMelder_string, U"Extract all columns whose label..."), text);
-		praat_new (thee.transfer(), my name, U"_", text);
+		praat_new (thee.move(), my name, U"_", text);
 	}
 END2 }
 
-FORM (TableOfReal_extractColumnsWhereRow, U"Extract columns where row", 0) {
+FORM (TableOfReal_extractColumnsWhereRow, U"Extract columns where row", nullptr) {
 	NATURAL (U"Extract all columns where row...", U"1")
 	OPTIONMENU_ENUM (U"...is...", kMelder_number, DEFAULT)
 	REAL (U"...the value", U"0.0")
@@ -1307,7 +1309,7 @@ DO
 	LOOP {
 		iam (TableOfReal);
 		autoTableOfReal thee = TableOfReal_extractColumnsWhereRow (me, row, GET_ENUM (kMelder_number, U"...is..."), value);
-		praat_new (thee.transfer(), my name, U"_", row, U"_", lround (value));
+		praat_new (thee.move(), my name, U"_", row, U"_", lround (value));
 	}
 END2 }
 
@@ -1315,11 +1317,11 @@ DIRECT2 (TableOfReal_extractRowLabelsAsStrings) {
 	LOOP {
 		iam (TableOfReal);
 		autoStrings thee = TableOfReal_extractRowLabelsAsStrings (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
-FORM (TableOfReal_extractRowRanges, U"Extract row ranges", 0) {
+FORM (TableOfReal_extractRowRanges, U"Extract row ranges", nullptr) {
 	LABEL (U"", U"Create a new TableOfReal from the following rows:")
 	TEXTFIELD (U"ranges", U"1 2")
 	LABEL (U"", U"To supply rising or falling ranges, use e.g. 2:6 or 5:3.")
@@ -1328,11 +1330,11 @@ DO
 	LOOP {
 		iam (TableOfReal);
 		autoTableOfReal thee = TableOfReal_extractRowRanges (me, GET_STRING (U"ranges"));
-		praat_new (thee.transfer(), my name, U"_rows");
+		praat_new (thee.move(), my name, U"_rows");
 	}
 END2 }
 
-FORM (TableOfReal_extractRowsWhere, U"Extract rows where", 0) {
+FORM (TableOfReal_extractRowsWhere, U"Extract rows where", nullptr) {
 	LABEL (U"", U"Extract all rows with at least one cell where:")
 	TEXTFIELD (U"condition", U"row mod 3 = 0 ; this example extracts every third row")
 	OK2
@@ -1340,11 +1342,11 @@ DO
 	LOOP {
 		iam (TableOfReal);
 		autoTableOfReal thee = TableOfReal_extractRowsWhere (me, GET_STRING (U"condition"), interpreter);
-		praat_new (thee.transfer(), my name, U"_rows");
+		praat_new (thee.move(), my name, U"_rows");
 	}
 END2 }
 
-FORM (TableOfReal_extractRowsWhereColumn, U"Extract rows where column", 0) {
+FORM (TableOfReal_extractRowsWhereColumn, U"Extract rows where column", nullptr) {
 	NATURAL (U"Extract all rows where column...", U"1")
 	OPTIONMENU_ENUM (U"...is...", kMelder_number, DEFAULT)
 	REAL (U"...the value", U"0.0")
@@ -1356,11 +1358,11 @@ DO
 		iam (TableOfReal);
 		autoTableOfReal thee = TableOfReal_extractRowsWhereColumn (me,
 			column, GET_ENUM (kMelder_number, U"...is..."), value);
-		praat_new (thee.transfer(), my name, U"_", column, U"_", lround (value));
+		praat_new (thee.move(), my name, U"_", column, U"_", lround (value));
 	}
 END2 }
 
-FORM (TableOfReal_extractRowsWhereLabel, U"Extract rows where label", 0) {
+FORM (TableOfReal_extractRowsWhereLabel, U"Extract rows where label", nullptr) {
 	OPTIONMENU_ENUM (U"Extract all rows whose label...", kMelder_string, DEFAULT)
 	SENTENCE (U"...the text", U"a")
 	OK2
@@ -1369,7 +1371,7 @@ DO
 	LOOP {
 		iam (TableOfReal);
 		autoTableOfReal thee = TableOfReal_extractRowsWhereLabel (me, GET_ENUM (kMelder_string, U"Extract all rows whose label..."), text);
-		praat_new (thee.transfer(), my name, U"_", text);
+		praat_new (thee.move(), my name, U"_", text);
 	}
 END2 }
 
@@ -1381,7 +1383,7 @@ DO
 	LOOP {
 		iam (TableOfReal);
 		try {
-			TableOfReal_formula (me, GET_STRING (U"formula"), interpreter, NULL);
+			TableOfReal_formula (me, GET_STRING (U"formula"), interpreter, nullptr);
 			praat_dataChanged (me);
 		} catch (MelderError) {
 			praat_dataChanged (me);
@@ -1390,7 +1392,7 @@ DO
 	}
 END2 }
 
-FORM (TableOfReal_getColumnIndex, U"Get column index", 0) {
+FORM (TableOfReal_getColumnIndex, U"Get column index", nullptr) {
 	SENTENCE (U"Column label", U"")
 	OK2
 DO
@@ -1401,7 +1403,7 @@ DO
 	}
 END2 }
 	
-FORM (TableOfReal_getColumnLabel, U"Get column label", 0) {
+FORM (TableOfReal_getColumnLabel, U"Get column label", nullptr) {
 	NATURAL (U"Column number", U"1")
 	OK2
 DO
@@ -1413,7 +1415,7 @@ DO
 	}
 END2 }
 	
-FORM (TableOfReal_getColumnMean_index, U"Get column mean", 0) {
+FORM (TableOfReal_getColumnMean_index, U"Get column mean", nullptr) {
 	NATURAL (U"Column number", U"1")
 	OK2
 DO
@@ -1426,7 +1428,7 @@ DO
 	}
 END2 }
 	
-FORM (TableOfReal_getColumnMean_label, U"Get column mean", 0) {
+FORM (TableOfReal_getColumnMean_label, U"Get column mean", nullptr) {
 	SENTENCE (U"Column label", U"")
 	OK2
 DO
@@ -1439,7 +1441,7 @@ DO
 	}
 END2 }
 	
-FORM (TableOfReal_getColumnStdev_index, U"Get column standard deviation", 0) {
+FORM (TableOfReal_getColumnStdev_index, U"Get column standard deviation", nullptr) {
 	NATURAL (U"Column number", U"1")
 	OK2
 DO
@@ -1448,11 +1450,11 @@ DO
 		long columnNumber = GET_INTEGER (U"Column number");
 		if (columnNumber > my numberOfColumns) Melder_throw (me, U": column number must not be greater than number of columns.");
 		double stdev = TableOfReal_getColumnStdev (me, columnNumber);
-		Melder_informationReal (stdev, NULL);
+		Melder_informationReal (stdev, nullptr);
 	}
 END2 }
 	
-FORM (TableOfReal_getColumnStdev_label, U"Get column standard deviation", 0) {
+FORM (TableOfReal_getColumnStdev_label, U"Get column standard deviation", nullptr) {
 	SENTENCE (U"Column label", U"1")
 	OK2
 DO
@@ -1461,7 +1463,7 @@ DO
 		long columnNumber = TableOfReal_columnLabelToIndex (me, GET_STRING (U"Column label"));
 		if (columnNumber == 0) Melder_throw (me, U": column label does not exist.");
 		double stdev = TableOfReal_getColumnStdev (me, columnNumber);
-		Melder_informationReal (stdev, NULL);
+		Melder_informationReal (stdev, nullptr);
 	}
 END2 }
 
@@ -1479,7 +1481,7 @@ DIRECT2 (TableOfReal_getNumberOfRows) {
 	}
 END2 }
 
-FORM (TableOfReal_getRowIndex, U"Get row index", 0) {
+FORM (TableOfReal_getRowIndex, U"Get row index", nullptr) {
 	SENTENCE (U"Row label", U"")
 	OK2
 DO
@@ -1490,7 +1492,7 @@ DO
 	}
 END2 }
 	
-FORM (TableOfReal_getRowLabel, U"Get row label", 0) {
+FORM (TableOfReal_getRowLabel, U"Get row label", nullptr) {
 	NATURAL (U"Row number", U"1")
 	OK2
 DO
@@ -1498,11 +1500,11 @@ DO
 		iam (TableOfReal);
 		long rowNumber = GET_INTEGER (U"Row number");
 		if (rowNumber > my numberOfRows) Melder_throw (me, U": row number must not be greater than number of rows.");
-		Melder_information (my rowLabels == NULL ? U"" : my rowLabels [rowNumber]);
+		Melder_information (my rowLabels ? my rowLabels [rowNumber] : U"");
 	}
 END2 }
 
-FORM (TableOfReal_getValue, U"Get value", 0) {
+FORM (TableOfReal_getValue, U"Get value", nullptr) {
 	NATURAL (U"Row number", U"1")
 	NATURAL (U"Column number", U"1")
 	OK2
@@ -1512,7 +1514,7 @@ DO
 		long rowNumber = GET_INTEGER (U"Row number"), columnNumber = GET_INTEGER (U"Column number");
 		if (rowNumber > my numberOfRows) Melder_throw (me, U": row number must not exceed number of rows.");
 		if (columnNumber > my numberOfColumns) Melder_throw (me, U": column number must not exceed number of columns.");
-		Melder_informationReal (my data [rowNumber] [columnNumber], NULL);
+		Melder_informationReal (my data [rowNumber] [columnNumber], nullptr);
 	}
 END2 }
 
@@ -1520,7 +1522,7 @@ DIRECT2 (TableOfReal_help) {
 	Melder_help (U"TableOfReal");
 END2 }
 
-FORM (TableOfReal_insertColumn, U"Insert column", 0) {
+FORM (TableOfReal_insertColumn, U"Insert column", nullptr) {
 	NATURAL (U"Column number", U"1")
 	OK2
 DO
@@ -1531,7 +1533,7 @@ DO
 	}
 END2 }
 
-FORM (TableOfReal_insertRow, U"Insert row", 0) {
+FORM (TableOfReal_insertRow, U"Insert row", nullptr) {
 	NATURAL (U"Row number", U"1")
 	OK2
 DO
@@ -1542,11 +1544,12 @@ DO
 	}
 END2 }
 
-FORM_READ2 (TableOfReal_readFromHeaderlessSpreadsheetFile, U"Read TableOfReal from headerless spreadsheet file", 0, true) {
-	praat_newWithFile (TableOfReal_readFromHeaderlessSpreadsheetFile (file), file, MelderFile_name (file));
+FORM_READ2 (TableOfReal_readFromHeaderlessSpreadsheetFile, U"Read TableOfReal from headerless spreadsheet file", nullptr, true) {
+	autoTableOfReal me = TableOfReal_readFromHeaderlessSpreadsheetFile (file);
+	praat_newWithFile (me.move(), file, MelderFile_name (file));
 END2 }
 
-FORM (TableOfReal_removeColumn, U"Remove column", 0) {
+FORM (TableOfReal_removeColumn, U"Remove column", nullptr) {
 	NATURAL (U"Column number", U"1")
 	OK2
 DO
@@ -1557,7 +1560,7 @@ DO
 	}
 END2 }
 
-FORM (TableOfReal_removeRow, U"Remove row", 0) {
+FORM (TableOfReal_removeRow, U"Remove row", nullptr) {
 	NATURAL (U"Row number", U"1")
 	OK2
 DO
@@ -1568,7 +1571,7 @@ DO
 	}
 END2 }
 
-FORM (TableOfReal_setColumnLabel_index, U"Set column label", 0) {
+FORM (TableOfReal_setColumnLabel_index, U"Set column label", nullptr) {
 	NATURAL (U"Column number", U"1")
 	SENTENCE (U"Label", U"")
 	OK2
@@ -1580,7 +1583,7 @@ DO
 	}
 END2 }
 
-FORM (TableOfReal_setColumnLabel_label, U"Set column label", 0) {
+FORM (TableOfReal_setColumnLabel_label, U"Set column label", nullptr) {
 	SENTENCE (U"Old label", U"")
 	SENTENCE (U"New label", U"")
 	OK2
@@ -1593,7 +1596,7 @@ DO
 	}
 END2 }
 
-FORM (TableOfReal_setRowLabel_index, U"Set row label", 0) {
+FORM (TableOfReal_setRowLabel_index, U"Set row label", nullptr) {
 	NATURAL (U"Row number", U"1")
 	SENTENCE (U"Label", U"")
 	OK2
@@ -1621,7 +1624,7 @@ DO
 	}
 END2 }
 
-FORM (TableOfReal_setRowLabel_label, U"Set row label", 0) {
+FORM (TableOfReal_setRowLabel_label, U"Set row label", nullptr) {
 	SENTENCE (U"Old label", U"")
 	SENTENCE (U"New label", U"")
 	OK2
@@ -1634,7 +1637,7 @@ DO
 	}
 END2 }
 
-FORM (TableOfReal_sortByColumn, U"Sort rows by column", 0) {
+FORM (TableOfReal_sortByColumn, U"Sort rows by column", nullptr) {
 	INTEGER (U"Column", U"1")
 	INTEGER (U"Secondary column", U"0")
 	OK2
@@ -1646,7 +1649,7 @@ DO
 	}
 END2 }
 
-FORM (TableOfReal_sortByLabel, U"Sort rows by label", 0) {
+FORM (TableOfReal_sortByLabel, U"Sort rows by label", nullptr) {
 	LABEL (U"", U"Secondary sorting keys:")
 	INTEGER (U"Column1", U"1")
 	INTEGER (U"Column2", U"0")
@@ -1663,18 +1666,18 @@ DIRECT2 (TableOfReal_to_Matrix) {
 	LOOP {
 		iam (TableOfReal);
 		autoMatrix thee = TableOfReal_to_Matrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
-FORM (TableOfReal_to_Table, U"TableOfReal: To Table", 0) {
+FORM (TableOfReal_to_Table, U"TableOfReal: To Table", nullptr) {
 	SENTENCE (U"Label of first column", U"rowLabel")
 	OK2
 DO
 	LOOP {
 		iam (TableOfReal);
 		autoTable thee = TableOfReal_to_Table (me, GET_STRING (U"Label of first column"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -1724,8 +1727,8 @@ static Any tabSeparatedFileRecognizer (int nread, const char *header, MelderFile
 		uheader [0] == 0xef && uheader [1] == 0xff ? isTabSeparated_utf16be (nread, header) :
 		uheader [0] == 0xff && uheader [1] == 0xef ? isTabSeparated_utf16le (nread, header) :
 		isTabSeparated_8bit (nread, header);
-	if (! isTabSeparated) return NULL;
-	return Table_readFromCharacterSeparatedTextFile (file, '\t');
+	if (! isTabSeparated) return nullptr;
+	return Table_readFromCharacterSeparatedTextFile (file, '\t').transfer();
 }
 
 void praat_TableOfReal_init (ClassInfo klas);   /* Buttons for TableOfReal and for its subclasses. */
diff --git a/sys/Collection.cpp b/sys/Collection.cpp
index 636378c..e8e3aee 100644
--- a/sys/Collection.cpp
+++ b/sys/Collection.cpp
@@ -532,13 +532,14 @@ long SortedSetOfString_lookUp (SortedSetOfString me, const char32 *string) {
 }
 
 void SortedSetOfString_addString (SortedSetOfString me, const char32 *string) {
-	static SimpleString simp;
+	static autoSimpleString simp;
 	if (! simp) {
 		simp = SimpleString_create (U"");
 		Melder_free (simp -> string);
 	}
 	simp -> string = (char32 *) string;   // reference copy
-	long index = my v_position (simp);
+	long index = my v_position (simp.get());
+	simp -> string = nullptr;   // otherwise Praat will crash at shutdown
 	if (index == 0) return;   // OK: already there: do not add
 	autoSimpleString newSimp = SimpleString_create (string);
 	_Collection_insertItem (me, newSimp.transfer(), index);
diff --git a/sys/Editor.cpp b/sys/Editor.cpp
index bd558e2..11f4ded 100644
--- a/sys/Editor.cpp
+++ b/sys/Editor.cpp
@@ -45,7 +45,6 @@ Thing_implement (EditorCommand, Thing, 0);
 void structEditorCommand :: v_destroy () {
 	Melder_free (our itemTitle);
 	Melder_free (our script);
-	forget (our d_uiform);
 	EditorCommand_Parent :: v_destroy ();
 }
 
@@ -399,7 +398,7 @@ void structEditor :: v_do_pictureMargins (EditorCommand cmd) {
 
 static void gui_window_cb_goAway (I) {
 	iam (Editor);
-	Melder_assert (me != nullptr);
+	Melder_assert (me);
 	Melder_assert (Thing_isa (me, classEditor));
 	my v_goAway ();
 }
diff --git a/sys/Editor.h b/sys/Editor.h
index e0fbec7..5960ab9 100644
--- a/sys/Editor.h
+++ b/sys/Editor.h
@@ -46,7 +46,7 @@ Thing_define (EditorCommand, Thing) {
 	GuiMenuItem itemWidget;
 	void (*commandCallback) (Editor editor_me, EditorCommand cmd, UiForm sendingForm, int narg, Stackel args, const char32 *sendingString, Interpreter interpreter);
 	const char32 *script;
-	UiForm d_uiform;
+	autoUiForm d_uiform;
 
 	void v_destroy ()
 		override;
@@ -61,6 +61,7 @@ Thing_define (Editor, Thing) {
 	char32 undoText [100];
 	Graphics pictureGraphics;
 	void (*d_dataChangedCallback) (Editor me, void *closure);                    void *d_dataChangedClosure;
+	void (*d_pleaseResetCallback) (Editor me, void *closure);                    void *d_pleaseResetClosure;
 	void (*d_destructionCallback) (Editor me, void *closure);                    void *d_destructionClosure;
 	void (*d_publicationCallback) (Editor me, void *closure, Daata publication); void *d_publicationClosure;
 	const char *callbackSocket;
@@ -153,6 +154,28 @@ inline static void Editor_broadcastDataChanged (Editor me)
 		if (my d_dataChangedCallback)
 			my d_dataChangedCallback (me, my d_dataChangedClosure);
 	}
+inline static void Editor_setPleaseResetCallback (Editor me, void (*pleaseResetCallback) (Editor me, void *closure), void *pleaseResetClosure)
+	/*
+	 * Message from boss: "notify me by calling this pleaseResetCallback when you agree to be closed."
+	 *
+	 * In Praat, "please reset" is what an editor tells her boss when the user tries to close the editor window
+	 * or when an object that is being viewed in an editor window is "Remove"d.
+	 * Typically, the boss will (in the pleaseResetCallback it installed) reset (i.e. delete) the autoEditor.
+	 */
+	{
+		my d_pleaseResetCallback = pleaseResetCallback;
+		my d_pleaseResetClosure = pleaseResetClosure;
+	}
+inline static void Editor_sendPleaseReset (Editor me)
+	/*
+	 * Message to boss: "please reset (delete) me."
+	 *
+	 * The editor typically calls this in Editor::v_goAway().
+	 */
+	{
+		if (my d_pleaseResetCallback)
+			my d_pleaseResetCallback (me, my d_pleaseResetClosure);
+	}
 inline static void Editor_setDestructionCallback (Editor me, void (*destructionCallback) (Editor me, void *closure), void *destructionClosure)
 	/*
 	 * Message from boss: "notify me by calling this destructionCallback every time you destroy yourself."
diff --git a/sys/EditorM.h b/sys/EditorM.h
index 7c4a680..e661b68 100644
--- a/sys/EditorM.h
+++ b/sys/EditorM.h
@@ -55,21 +55,21 @@
 #undef GET_STRING
 #undef GET_FILE
 
-#define REAL(label,def)		UiForm_addReal (cmd -> d_uiform, label, def);
-#define REAL_OR_UNDEFINED(label,def)  UiForm_addRealOrUndefined (cmd -> d_uiform, label, def);
-#define POSITIVE(label,def)	UiForm_addPositive (cmd -> d_uiform, label, def);
-#define INTEGER(label,def)	UiForm_addInteger (cmd -> d_uiform, label, def);
-#define NATURAL(label,def)	UiForm_addNatural (cmd -> d_uiform, label, def);
-#define WORD(label,def)		UiForm_addWord (cmd -> d_uiform, label, def);
-#define SENTENCE(label,def)	UiForm_addSentence (cmd -> d_uiform, label, def);
-#define COLOUR(label,def)	UiForm_addColour (cmd -> d_uiform, label, def);
-#define CHANNEL(label,def)	UiForm_addChannel (cmd -> d_uiform, label, def);
-#define BOOLEAN(label,def)	UiForm_addBoolean (cmd -> d_uiform, label, def);
-#define LABEL(name,label)	UiForm_addLabel (cmd -> d_uiform, name, label);
-#define TEXTFIELD(name,def)	UiForm_addText (cmd -> d_uiform, name, def);
-#define RADIO(label,def)	radio = UiForm_addRadio (cmd -> d_uiform, label, def);
+#define REAL(label,def)		UiForm_addReal (cmd -> d_uiform.get(), label, def);
+#define REAL_OR_UNDEFINED(label,def)  UiForm_addRealOrUndefined (cmd -> d_uiform.get(), label, def);
+#define POSITIVE(label,def)	UiForm_addPositive (cmd -> d_uiform.get(), label, def);
+#define INTEGER(label,def)	UiForm_addInteger (cmd -> d_uiform.get(), label, def);
+#define NATURAL(label,def)	UiForm_addNatural (cmd -> d_uiform.get(), label, def);
+#define WORD(label,def)		UiForm_addWord (cmd -> d_uiform.get(), label, def);
+#define SENTENCE(label,def)	UiForm_addSentence (cmd -> d_uiform.get(), label, def);
+#define COLOUR(label,def)	UiForm_addColour (cmd -> d_uiform.get(), label, def);
+#define CHANNEL(label,def)	UiForm_addChannel (cmd -> d_uiform.get(), label, def);
+#define BOOLEAN(label,def)	UiForm_addBoolean (cmd -> d_uiform.get(), label, def);
+#define LABEL(name,label)	UiForm_addLabel (cmd -> d_uiform.get(), name, label);
+#define TEXTFIELD(name,def)	UiForm_addText (cmd -> d_uiform.get(), name, def);
+#define RADIO(label,def)	radio = UiForm_addRadio (cmd -> d_uiform.get(), label, def);
 #define RADIOBUTTON(label)	UiRadio_addButton (radio, label);
-#define OPTIONMENU(label,def)	radio = UiForm_addOptionMenu (cmd -> d_uiform, label, def);
+#define OPTIONMENU(label,def)	radio = UiForm_addOptionMenu (cmd -> d_uiform.get(), label, def);
 #define OPTION(label)	UiOptionMenu_addButton (radio, label);
 #define RADIOBUTTONS_ENUM(labelProc,min,max) { for (int itext = min; itext <= max; itext ++) RADIOBUTTON (labelProc) }
 #define OPTIONS_ENUM(labelProc,min,max) { for (int itext = min; itext <= max; itext ++) OPTION (labelProc) }
@@ -81,10 +81,10 @@
 	OPTIONMENU (label, def - enum##_MIN + 1) \
 	for (int ienum = enum##_MIN; ienum <= enum##_MAX; ienum ++) \
 		OPTION (enum##_getText (ienum))
-#define LIST(label,n,str,def)	UiForm_addList (cmd -> d_uiform, label, n, str, def);
-#define SET_REAL(name,value)	UiForm_setReal (cmd -> d_uiform, name, value);
-#define SET_INTEGER(name,value)	UiForm_setInteger (cmd -> d_uiform, name, value);
-#define SET_STRING(name,value)	UiForm_setString (cmd -> d_uiform, name, value);
+#define LIST(label,n,str,def)	UiForm_addList (cmd -> d_uiform.get(), label, n, str, def);
+#define SET_REAL(name,value)	UiForm_setReal (cmd -> d_uiform.get(), name, value);
+#define SET_INTEGER(name,value)	UiForm_setInteger (cmd -> d_uiform.get(), name, value);
+#define SET_STRING(name,value)	UiForm_setString (cmd -> d_uiform.get(), name, value);
 #define SET_ENUM(name,enum,value)  SET_STRING (name, enum##_getText (value))
 
 #define DIALOG  cmd -> d_uiform
@@ -93,8 +93,8 @@
 #define EDITOR_IAM(klas)  iam (klas); (void) me; (void) cmd; (void) sendingForm; (void) narg; (void) args; (void) sendingString; (void) interpreter
 #define EDITOR_FORM(title,helpTitle)  if (! cmd -> d_uiform) { Any radio = 0; (void) radio; \
 	cmd -> d_uiform = UiForm_createE (cmd, title, cmd -> itemTitle, helpTitle);
-#define EDITOR_OK  UiForm_finish (cmd -> d_uiform); } if (! sendingForm && ! args && ! sendingString) {
-#define EDITOR_DO  UiForm_do (cmd -> d_uiform, false); } else if (! sendingForm) { \
+#define EDITOR_OK  UiForm_finish (cmd -> d_uiform.get()); } if (! sendingForm && ! args && ! sendingString) {
+#define EDITOR_DO  UiForm_do (cmd -> d_uiform.get(), false); } else if (! sendingForm) { \
 	UiForm_parseStringE (cmd, narg, args, sendingString, interpreter); } else {
 #define EDITOR_END  }
 
@@ -103,7 +103,7 @@
 		cmd -> d_uiform = UiOutfile_createE (cmd, title, cmd -> itemTitle, helpTitle); \
 		} if (! sendingForm && ! args && ! sendingString) { char32 defaultName [300]; defaultName [0] = U'\0';
 #define EDITOR_DO_WRITE \
-	UiOutfile_do (cmd -> d_uiform, defaultName); } else { MelderFile file; structMelderFile file2 = { 0 }; \
+	UiOutfile_do (cmd -> d_uiform.get(), defaultName); } else { MelderFile file; structMelderFile file2 = { 0 }; \
 		if (! args && ! sendingString) file = UiFile_getFile (sendingForm); \
 		else { Melder_relativePathToFile (args ? args [1]. string : sendingString, & file2); file = & file2; }
 
@@ -112,15 +112,15 @@
 		cmd -> d_uiform = UiInfile_createE (cmd, title, cmd -> itemTitle, helpTitle); \
 		} if (! sendingForm && ! args && ! sendingString) {
 #define EDITOR_DO_READ \
-	UiInfile_do (cmd -> d_uiform); } else { MelderFile file; structMelderFile file2 = { 0 }; \
+	UiInfile_do (cmd -> d_uiform.get()); } else { MelderFile file; structMelderFile file2 = { 0 }; \
 		if (! args && ! sendingString) file = UiFile_getFile (sendingForm); \
 		else { Melder_relativePathToFile (args ? args [1]. string : sendingString, & file2); file = & file2; }
 
-#define GET_REAL(name)  UiForm_getReal (cmd -> d_uiform, name)
-#define GET_INTEGER(name)  UiForm_getInteger (cmd -> d_uiform, name)
-#define GET_STRING(name)  UiForm_getString (cmd -> d_uiform, name)
+#define GET_REAL(name)  UiForm_getReal (cmd -> d_uiform.get(), name)
+#define GET_INTEGER(name)  UiForm_getInteger (cmd -> d_uiform.get(), name)
+#define GET_STRING(name)  UiForm_getString (cmd -> d_uiform.get(), name)
 #define GET_ENUM(enum,name)  (enum) enum##_getValue (GET_STRING (name))
-#define GET_FILE  UiForm_getFile (cmd -> d_uiform)
+#define GET_FILE  UiForm_getFile (cmd -> d_uiform.get())
 
 /* End of file EditorM.h */
 #endif
diff --git a/sys/Graphics.h b/sys/Graphics.h
index e54d584..0c5a420 100644
--- a/sys/Graphics.h
+++ b/sys/Graphics.h
@@ -115,15 +115,15 @@ Thing_define (Graphics, Thing) {
 	void v_destroy ()
 		override;
 
-	virtual void v_polyline (long numberOfPoints, double *xyDC, bool close) { (void) numberOfPoints; (void) xyDC; (void) close; }
-	virtual void v_fillArea (long numberOfPoints, double *xyDC) { (void) numberOfPoints; (void) xyDC; }
-	virtual void v_rectangle (double x1DC, double x2DC, double y1DC, double y2DC) { (void) x1DC; (void) x2DC; (void) y1DC; (void) y2DC; }
-	virtual void v_fillRectangle (double a_x1DC, double a_x2DC, double a_y1DC, double a_y2DC) { (void) a_x1DC; (void) a_x2DC; (void) a_y1DC; (void) a_y2DC; }
-	virtual void v_circle (double xDC, double yDC, double rDC) { (void) xDC; (void) yDC; (void) rDC; }
-	virtual void v_ellipse (double a_x1DC, double a_x2DC, double a_y1DC, double a_y2DC) { (void) a_x1DC; (void) a_x2DC; (void) a_y1DC; (void) a_y2DC; }
-	virtual void v_arc (double xDC, double yDC, double rDC, double fromAngle, double toAngle) { (void) xDC; (void) yDC; (void) rDC; (void) fromAngle; (void) toAngle; }
-	virtual void v_fillCircle (double xDC, double yDC, double rDC) { (void) xDC; (void) yDC; (void) rDC; }
-	virtual void v_fillEllipse (double a_x1DC, double a_x2DC, double a_y1DC, double a_y2DC) { (void) a_x1DC; (void) a_x2DC; (void) a_y1DC; (void) a_y2DC; }
+	virtual void v_polyline (long /* numberOfPoints */, double * /* xyDC */, bool /* close */) { }
+	virtual void v_fillArea (long /* numberOfPoints */, double * /* xyDC */) { }
+	virtual void v_rectangle (double /* x1DC */, double /* x2DC */, double /* y1DC */, double /* y2DC */) { }
+	virtual void v_fillRectangle (double /* x1DC */, double /* x2DC */, double /* y1DC */, double /* y2DC */) { }
+	virtual void v_circle (double /* xDC */, double /* yDC */, double /* rDC */) { }
+	virtual void v_ellipse (double /* x1DC */, double /* x2DC */, double /* y1DC */, double /* y2DC */) { }
+	virtual void v_arc (double /* xDC */, double /* yDC */, double /* rDC */, double /* fromAngle */, double /* toAngle */) { }
+	virtual void v_fillCircle (double /* xDC */, double /* yDC */, double /* rDC */) { }
+	virtual void v_fillEllipse (double /* x1DC */, double /* x2DC */, double /* y1DC */, double /* y2DC */) { }
 	virtual void v_button (double a_x1DC, double a_x2DC, double a_y1DC, double a_y2DC)
 		{
 			v_rectangle (a_x1DC, a_x2DC, a_y1DC, a_y2DC);   // the simplest implementation
diff --git a/sys/Gui.h b/sys/Gui.h
index bce4842..06407b5 100644
--- a/sys/Gui.h
+++ b/sys/Gui.h
@@ -382,8 +382,10 @@ typedef struct structGuiButtonEvent {
 	bool shiftKeyPressed, commandKeyPressed, optionKeyPressed, extraControlKeyPressed;
 } *GuiButtonEvent;
 
+typedef void (*GuiButton_ActivateCallback) (void *boss, GuiButtonEvent event);
+
 Thing_define (GuiButton, GuiControl) {
-	void (*d_activateCallback) (void *boss, GuiButtonEvent event);
+	GuiButton_ActivateCallback d_activateCallback;
 	void *d_activateBoss;
 	GuiMenu d_menu;   // for cascade buttons
 };
@@ -396,12 +398,12 @@ Thing_define (GuiButton, GuiControl) {
 GuiButton GuiButton_create      (GuiForm parent,
 	int left, int right, int top, int bottom,
 	const char32 *text,
-	void (*activateCallback) (void *boss, GuiButtonEvent event), void *boss,
+	GuiButton_ActivateCallback activateCallback, void *boss,
 	uint32 flags);
 GuiButton GuiButton_createShown (GuiForm parent,
 	int left, int right, int top, int bottom,
 	const char32 *text,
-	void (*activateCallback) (void *boss, GuiButtonEvent event), void *boss,
+	GuiButton_ActivateCallback activateCallback, void *boss,
 	uint32 flags);
 
 void GuiButton_setText (GuiButton me, const char32 *text /* cattable */);
diff --git a/sys/GuiButton.cpp b/sys/GuiButton.cpp
index c806d49..cac2ffa 100644
--- a/sys/GuiButton.cpp
+++ b/sys/GuiButton.cpp
@@ -160,7 +160,7 @@ Thing_implement (GuiButton, GuiControl, 0);
 #endif
 
 GuiButton GuiButton_create (GuiForm parent, int left, int right, int top, int bottom,
-	const char32 *buttonText, void (*activateCallback) (void *boss, GuiButtonEvent event), void *activateBoss, uint32 flags)
+	const char32 *buttonText, GuiButton_ActivateCallback activateCallback, void *activateBoss, uint32 flags)
 {
 	GuiButton me = Thing_new (GuiButton);
 	my d_shell = parent -> d_shell;
@@ -259,7 +259,7 @@ GuiButton GuiButton_create (GuiForm parent, int left, int right, int top, int bo
 }
 
 GuiButton GuiButton_createShown (GuiForm parent, int left, int right, int top, int bottom,
-	const char32 *buttonText, void (*clickedCallback) (void *boss, GuiButtonEvent event), void *clickedBoss, uint32 flags)
+	const char32 *buttonText, GuiButton_ActivateCallback clickedCallback, void *clickedBoss, uint32 flags)
 {
 	GuiButton me = GuiButton_create (parent, left, right, top, bottom, buttonText, clickedCallback, clickedBoss, flags);
 	GuiThing_show (me);
diff --git a/sys/ScriptEditor.cpp b/sys/ScriptEditor.cpp
index f956d4f..d4a9f45 100644
--- a/sys/ScriptEditor.cpp
+++ b/sys/ScriptEditor.cpp
@@ -24,7 +24,7 @@
 
 Thing_implement (ScriptEditor, TextEditor, 0);
 
-static Collection theScriptEditors;
+static Collection theScriptEditors;   // cannot be an autoCollection until Collection_undangleItem() isn't called in v_destroy()
 
 bool ScriptEditors_dirty () {
 	if (! theScriptEditors) return false;
@@ -38,7 +38,6 @@ bool ScriptEditors_dirty () {
 void structScriptEditor :: v_destroy () {
 	Melder_free (environmentName);
 	forget (interpreter);
-	forget (argsDialog);
 	if (theScriptEditors) Collection_undangleItem (theScriptEditors, this);
 	ScriptEditor_Parent :: v_destroy ();
 }
@@ -64,14 +63,10 @@ void structScriptEditor :: v_goAway () {
 	}
 }
 
-static void args_ok (UiForm sendingForm, int narg_dummy, Stackel args_dummy, const char32 *sendingString_dummy, Interpreter interpreter_dummy, const char32 *invokingButtonTitle, bool modified_dummy, I) {
+static void args_ok (UiForm sendingForm, int /* narg */, Stackel /* args */, const char32 * /* sendingString */,
+	Interpreter /* interpreter */, const char32 * /* invokingButtonTitle */, bool /* modified */, I)
+{
 	iam (ScriptEditor);
-	(void) narg_dummy;
-	(void) args_dummy;
-	(void) sendingString_dummy;
-	(void) interpreter_dummy;
-	(void) invokingButtonTitle;
-	(void) modified_dummy;
 	autostring32 text = GuiText_getString (my textWidget);
 	structMelderFile file = { 0 };
 	if (my name [0]) {
@@ -87,14 +82,10 @@ static void args_ok (UiForm sendingForm, int narg_dummy, Stackel args_dummy, con
 	Interpreter_run (my interpreter, text.peek());
 }
 
-static void args_ok_selectionOnly (UiForm sendingForm, int narg_dummy, Stackel args_dummy, const char32 *sendingString_dummy, Interpreter interpreter_dummy, const char32 *invokingButtonTitle, bool modified_dummy, I) {
+static void args_ok_selectionOnly (UiForm sendingForm, int /* narg */, Stackel /* args */, const char32 * /* sendingString */,
+	Interpreter /* interpreter */, const char32 * /* invokingButtonTitle */, bool /* modified */, I)
+{
 	iam (ScriptEditor);
-	(void) narg_dummy;
-	(void) args_dummy;
-	(void) sendingString_dummy;
-	(void) interpreter_dummy;
-	(void) invokingButtonTitle;
-	(void) modified_dummy;
 	autostring32 text = GuiText_getSelection (my textWidget);
 	if (text.peek() == NULL)
 		Melder_throw (U"No text is selected any longer.\nPlease reselect or click Cancel.");
@@ -129,9 +120,8 @@ static void menu_cb_run (EDITOR_ARGS) {
 		/*
 		 * Pop up a dialog box for querying the arguments.
 		 */
-		forget (my argsDialog);
-		my argsDialog = Interpreter_createForm (my interpreter, my d_windowForm, NULL, args_ok, me, false);
-		UiForm_do (my argsDialog, false);
+		my argsDialog = Interpreter_createForm (my interpreter, my d_windowForm, nullptr, args_ok, me, false);
+		UiForm_do (my argsDialog.get(), false);
 	} else {
 		autoPraatBackground background;
 		if (my name [0]) MelderFile_setDefaultDir (& file);
@@ -158,9 +148,8 @@ static void menu_cb_runSelection (EDITOR_ARGS) {
 		/*
 		 * Pop up a dialog box for querying the arguments.
 		 */
-		forget (my argsDialog);
-		my argsDialog = Interpreter_createForm (my interpreter, my d_windowForm, NULL, args_ok_selectionOnly, me, true);
-		UiForm_do (my argsDialog, false);
+		my argsDialog = Interpreter_createForm (my interpreter, my d_windowForm, nullptr, args_ok_selectionOnly, me, true);
+		UiForm_do (my argsDialog.get(), false);
 	} else {
 		autoPraatBackground background;
 		if (my name [0]) MelderFile_setDefaultDir (& file);
@@ -332,14 +321,14 @@ void structScriptEditor :: v_createHelpMenuItems (EditorMenu menu) {
 }
 
 void ScriptEditor_init (ScriptEditor me, Editor environment, const char32 *initialText) {
-	if (environment != NULL) {
+	if (environment) {
 		my environmentName = Melder_dup (environment -> name);
 		my editorClass = environment -> classInfo;
 	}
 	TextEditor_init (me, initialText);
 	my interpreter = Interpreter_createFromEnvironment (environment);
-	if (theScriptEditors == NULL) {
-		theScriptEditors = Collection_create (NULL, 10);
+	if (! theScriptEditors) {
+		theScriptEditors = Collection_create (nullptr, 10);
 		Collection_dontOwnItems (theScriptEditors);
 	}
 	Collection_addItem (theScriptEditors, me);
diff --git a/sys/ScriptEditor.h b/sys/ScriptEditor.h
index 686acf7..76e0986 100644
--- a/sys/ScriptEditor.h
+++ b/sys/ScriptEditor.h
@@ -27,7 +27,7 @@ Thing_define (ScriptEditor, TextEditor) {
 	char32 *environmentName;
 	ClassInfo editorClass;
 	Interpreter interpreter;
-	UiForm argsDialog;
+	autoUiForm argsDialog;
 
 	void v_destroy ()
 		override;
diff --git a/sys/Simple.cpp b/sys/Simple.cpp
index bc1e3c8..79e846f 100644
--- a/sys/Simple.cpp
+++ b/sys/Simple.cpp
@@ -40,34 +40,34 @@
 
 Thing_implement (SimpleInt, Daata, 0);
 
-SimpleInt SimpleInt_create (int number) {
+autoSimpleInt SimpleInt_create (int number) {
 	autoSimpleInt me = Thing_new (SimpleInt);
 	my number = number;
-	return me.transfer();
+	return me;
 }
 
 Thing_implement (SimpleLong, Daata, 0);
 
-SimpleLong SimpleLong_create (long number) {
+autoSimpleLong SimpleLong_create (long number) {
 	autoSimpleLong me = Thing_new (SimpleLong);
 	my number = number;
-	return me.transfer();
+	return me;
 }
 
 Thing_implement (SimpleDouble, Daata, 0);
 
-SimpleDouble SimpleDouble_create (double number) {
+autoSimpleDouble SimpleDouble_create (double number) {
 	autoSimpleDouble me = Thing_new (SimpleDouble);
 	my number = number;
-	return me.transfer();
+	return me;
 }
 
 Thing_implement (SimpleString, Daata, 0);
 
-SimpleString SimpleString_create (const char32 *string) {
+autoSimpleString SimpleString_create (const char32 *string) {
 	autoSimpleString me = Thing_new (SimpleString);
 	my string = Melder_dup (string);
-	return me.transfer();
+	return me;
 }
 
 /* End of file Simple.cpp */
diff --git a/sys/Simple.h b/sys/Simple.h
index 6237c5a..decf021 100644
--- a/sys/Simple.h
+++ b/sys/Simple.h
@@ -27,10 +27,10 @@ oo_CLASS_CREATE (SimpleLong, Daata);
 oo_CLASS_CREATE (SimpleDouble, Daata);
 oo_CLASS_CREATE (SimpleString, Daata);
 
-SimpleInt SimpleInt_create (int number);
-SimpleLong SimpleLong_create (long number);
-SimpleDouble SimpleDouble_create (double number);
-SimpleString SimpleString_create (const char32 *string);
+autoSimpleInt SimpleInt_create (int number);
+autoSimpleLong SimpleLong_create (long number);
+autoSimpleDouble SimpleDouble_create (double number);
+autoSimpleString SimpleString_create (const char32 *string);
 
 /* End of file Simple.h */
 #endif
diff --git a/sys/Strings.cpp b/sys/Strings.cpp
index ecdf027..2b5afb3 100644
--- a/sys/Strings.cpp
+++ b/sys/Strings.cpp
@@ -96,7 +96,7 @@ const char32 * structStrings :: v_getVectorStr (long icol) {
 
 #define Strings_createAsFileOrDirectoryList_TYPE_FILE  0
 #define Strings_createAsFileOrDirectoryList_TYPE_DIRECTORY  1
-static Strings Strings_createAsFileOrDirectoryList (const char32 *path /* cattable */, int type) {
+static autoStrings Strings_createAsFileOrDirectoryList (const char32 *path /* cattable */, int type) {
 	#if USE_STAT
 		/*
 		 * Initialize.
@@ -165,7 +165,7 @@ static Strings Strings_createAsFileOrDirectoryList (const char32 *path /* cattab
 			}
 			closedir (d);
 			Strings_sort (me.peek());
-			return me.transfer();
+			return me;
 		} catch (MelderError) {
 			if (d) closedir (d);   // "finally"
 			throw;
@@ -195,14 +195,14 @@ static Strings Strings_createAsFileOrDirectoryList (const char32 *path /* cattab
 				FindClose (searchHandle);
 			}
 			Strings_sort (me.peek());
-			return me.transfer();
+			return me;
 		} catch (MelderError) {
 			throw;
 		}
 	#endif
 }
 
-Strings Strings_createAsFileList (const char32 *path /* cattable */) {
+autoStrings Strings_createAsFileList (const char32 *path /* cattable */) {
 	try {
 		return Strings_createAsFileOrDirectoryList (path, Strings_createAsFileOrDirectoryList_TYPE_FILE);
 	} catch (MelderError) {
@@ -210,7 +210,7 @@ Strings Strings_createAsFileList (const char32 *path /* cattable */) {
 	}
 }
 
-Strings Strings_createAsDirectoryList (const char32 *path /* cattable */) {
+autoStrings Strings_createAsDirectoryList (const char32 *path /* cattable */) {
 	try {
 		return Strings_createAsFileOrDirectoryList (path, Strings_createAsFileOrDirectoryList_TYPE_DIRECTORY);
 	} catch (MelderError) {
@@ -218,7 +218,7 @@ Strings Strings_createAsDirectoryList (const char32 *path /* cattable */) {
 	}
 }
 
-Strings Strings_readFromRawTextFile (MelderFile file) {
+autoStrings Strings_readFromRawTextFile (MelderFile file) {
 	try {
 		autoMelderReadText text = MelderReadText_createFromFile (file);
 
@@ -241,7 +241,7 @@ Strings Strings_readFromRawTextFile (MelderFile file) {
 			char32 *line = MelderReadText_readLine (text.peek());
 			my strings [i] = Melder_dup (line);
 		}
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Strings not read from raw text file ", file, U".");
 	}
diff --git a/sys/Strings_.h b/sys/Strings_.h
index 195ab25..f22d9cf 100644
--- a/sys/Strings_.h
+++ b/sys/Strings_.h
@@ -24,9 +24,9 @@
 #include "Strings_def.h"
 oo_CLASS_CREATE (Strings, Daata);
 
-Strings Strings_createAsFileList (const char32 *path /* cattable */);
-Strings Strings_createAsDirectoryList (const char32 *path /* cattable */);
-Strings Strings_readFromRawTextFile (MelderFile file);
+autoStrings Strings_createAsFileList (const char32 *path /* cattable */);
+autoStrings Strings_createAsDirectoryList (const char32 *path /* cattable */);
+autoStrings Strings_readFromRawTextFile (MelderFile file);
 void Strings_writeToRawTextFile (Strings me, MelderFile file);
 
 void Strings_randomize (Strings me);
diff --git a/sys/TextEditor.cpp b/sys/TextEditor.cpp
index af3a8d1..227640c 100644
--- a/sys/TextEditor.cpp
+++ b/sys/TextEditor.cpp
@@ -32,15 +32,11 @@ Thing_implement (TextEditor, Editor, 0);
 #include "prefs_copyToInstance.h"
 #include "TextEditor_prefs.h"
 
-static Collection theOpenTextEditors = NULL;
+static Collection theOpenTextEditors;   // cannot be an autoCollection until Collection_undangleItem() isn't called in v_destroy()
 
 /***** TextEditor methods *****/
 
 void structTextEditor :: v_destroy () {
-	forget (our openDialog);
-	forget (our saveDialog);
-	forget (our printDialog);
-	forget (our findDialog);
 	if (theOpenTextEditors) {
 		Collection_undangleItem (theOpenTextEditors, this);
 	}
@@ -121,8 +117,8 @@ static void cb_open_ok (UiForm sendingForm, int /* narg */, Stackel /* args */,
 static void cb_showOpen (EditorCommand cmd, UiForm /* sendingForm */, const char32 * /* sendingString */, Interpreter /* interpreter */) {
 	TextEditor me = (TextEditor) cmd -> d_editor;
 	if (! my openDialog)
-		my openDialog = UiInfile_create (my d_windowForm, U"Open", cb_open_ok, me, NULL, NULL, false);
-	UiInfile_do (my openDialog);
+		my openDialog = UiInfile_create (my d_windowForm, U"Open", cb_open_ok, me, nullptr, nullptr, false);
+	UiInfile_do (my openDialog.get());
 }
 
 static void cb_saveAs_ok (UiForm sendingForm, int /* narg */, Stackel /* args */, const char32 * /* sendingString */,
@@ -136,14 +132,13 @@ static void cb_saveAs_ok (UiForm sendingForm, int /* narg */, Stackel /* args */
 static void menu_cb_saveAs (EDITOR_ARGS) {
 	EDITOR_IAM (TextEditor);
 	if (! my saveDialog)
-		my saveDialog = UiOutfile_create (my d_windowForm, U"Save", cb_saveAs_ok, me, NULL, NULL);
+		my saveDialog = UiOutfile_create (my d_windowForm, U"Save", cb_saveAs_ok, me, nullptr, nullptr);
 	char32 defaultName [300];
 	Melder_sprint (defaultName,300, ! my v_fileBased () ? U"info.txt" : my name [0] ? MelderFile_name (& my file) : U"");
-	UiOutfile_do (my saveDialog, defaultName);
+	UiOutfile_do (my saveDialog.get(), defaultName);
 }
 
-static void gui_button_cb_saveAndOpen (I, GuiButtonEvent event) {
-	(void) event;
+static void gui_button_cb_saveAndOpen (I, GuiButtonEvent /* event */) {
 	EditorCommand cmd = (EditorCommand) void_me;
 	TextEditor me = (TextEditor) cmd -> d_editor;
 	GuiThing_hide (my dirtyOpenDialog);
@@ -154,37 +149,35 @@ static void gui_button_cb_saveAndOpen (I, GuiButtonEvent event) {
 			Melder_flushError ();
 			return;
 		}
-		cb_showOpen (cmd, NULL, NULL, NULL);
+		cb_showOpen (cmd, nullptr, nullptr, nullptr);
 	} else {
-		menu_cb_saveAs (me, cmd, NULL, 0, NULL, NULL, NULL);
+		menu_cb_saveAs (me, cmd, nullptr, 0, nullptr, nullptr, nullptr);
 	}
 }
 
-static void gui_button_cb_cancelOpen (I, GuiButtonEvent event) {
-	(void) event;
+static void gui_button_cb_cancelOpen (I, GuiButtonEvent /* event */) {
 	EditorCommand cmd = (EditorCommand) void_me;
 	TextEditor me = (TextEditor) cmd -> d_editor;
 	GuiThing_hide (my dirtyOpenDialog);
 }
 
-static void gui_button_cb_discardAndOpen (I, GuiButtonEvent event) {
-	(void) event;
+static void gui_button_cb_discardAndOpen (I, GuiButtonEvent /* event */) {
 	EditorCommand cmd = (EditorCommand) void_me;
 	TextEditor me = (TextEditor) cmd -> d_editor;
 	GuiThing_hide (my dirtyOpenDialog);
-	cb_showOpen (cmd, NULL, NULL, NULL);
+	cb_showOpen (cmd, nullptr, nullptr, nullptr);
 }
 
 static void menu_cb_open (EDITOR_ARGS) {
 	EDITOR_IAM (TextEditor);
 	if (my dirty) {
-		if (my dirtyOpenDialog == NULL) {
+		if (! my dirtyOpenDialog) {
 			int buttonWidth = 120, buttonSpacing = 20;
 			my dirtyOpenDialog = GuiDialog_create (my d_windowForm,
 				150, 70,
 				Gui_LEFT_DIALOG_SPACING + 3 * buttonWidth + 2 * buttonSpacing + Gui_RIGHT_DIALOG_SPACING,
 				Gui_TOP_DIALOG_SPACING + Gui_TEXTFIELD_HEIGHT + Gui_VERTICAL_DIALOG_SPACING_SAME + 2 * Gui_BOTTOM_DIALOG_SPACING + Gui_PUSHBUTTON_HEIGHT,
-				U"Text changed", NULL, NULL, GuiDialog_MODAL);
+				U"Text changed", nullptr, nullptr, GuiDialog_MODAL);
 			GuiLabel_createShown (my dirtyOpenDialog,
 				Gui_LEFT_DIALOG_SPACING, - Gui_RIGHT_DIALOG_SPACING,
 				Gui_TOP_DIALOG_SPACING, Gui_TOP_DIALOG_SPACING + Gui_LABEL_HEIGHT,
@@ -208,8 +201,7 @@ static void menu_cb_open (EDITOR_ARGS) {
 	}
 }
 
-static void gui_button_cb_saveAndNew (I, GuiButtonEvent event) {
-	(void) event;
+static void gui_button_cb_saveAndNew (I, GuiButtonEvent /* event */) {
 	EditorCommand cmd = (EditorCommand) void_me;
 	TextEditor me = (TextEditor) cmd -> d_editor;
 	GuiThing_hide (my dirtyNewDialog);
@@ -222,19 +214,17 @@ static void gui_button_cb_saveAndNew (I, GuiButtonEvent event) {
 		}
 		newDocument (me);
 	} else {
-		menu_cb_saveAs (me, cmd, NULL, 0, NULL, NULL, NULL);
+		menu_cb_saveAs (me, cmd, nullptr, 0, nullptr, nullptr, nullptr);
 	}
 }
 
-static void gui_button_cb_cancelNew (I, GuiButtonEvent event) {
-	(void) event;
+static void gui_button_cb_cancelNew (I, GuiButtonEvent /* event */) {
 	EditorCommand cmd = (EditorCommand) void_me;
 	TextEditor me = (TextEditor) cmd -> d_editor;
 	GuiThing_hide (my dirtyNewDialog);
 }
 
-static void gui_button_cb_discardAndNew (I, GuiButtonEvent event) {
-	(void) event;
+static void gui_button_cb_discardAndNew (I, GuiButtonEvent /* event */) {
 	EditorCommand cmd = (EditorCommand) void_me;
 	TextEditor me = (TextEditor) cmd -> d_editor;
 	GuiThing_hide (my dirtyNewDialog);
@@ -249,7 +239,7 @@ static void menu_cb_new (EDITOR_ARGS) {
 			my dirtyNewDialog = GuiDialog_create (my d_windowForm,
 				150, 70, Gui_LEFT_DIALOG_SPACING + 3 * buttonWidth + 2 * buttonSpacing + Gui_RIGHT_DIALOG_SPACING,
 					Gui_TOP_DIALOG_SPACING + Gui_TEXTFIELD_HEIGHT + Gui_VERTICAL_DIALOG_SPACING_SAME + 2 * Gui_BOTTOM_DIALOG_SPACING + Gui_PUSHBUTTON_HEIGHT,
-				U"Text changed", NULL, NULL, GuiDialog_MODAL);
+				U"Text changed", nullptr, nullptr, GuiDialog_MODAL);
 			GuiLabel_createShown (my dirtyNewDialog,
 				Gui_LEFT_DIALOG_SPACING, - Gui_RIGHT_DIALOG_SPACING,
 				Gui_TOP_DIALOG_SPACING, Gui_TOP_DIALOG_SPACING + Gui_LABEL_HEIGHT,
@@ -288,7 +278,7 @@ static void menu_cb_save (EDITOR_ARGS) {
 			return;
 		}
 	} else {
-		menu_cb_saveAs (me, cmd, NULL, 0, NULL, NULL, NULL);
+		menu_cb_saveAs (me, cmd, nullptr, 0, nullptr, nullptr, nullptr);
 	}
 }
 
@@ -306,8 +296,7 @@ static void menu_cb_reopen (EDITOR_ARGS) {
 	}
 }
 
-static void gui_button_cb_saveAndClose (I, GuiButtonEvent event) {
-	(void) event;
+static void gui_button_cb_saveAndClose (I, GuiButtonEvent /* event */) {
 	iam (TextEditor);
 	GuiThing_hide (my dirtyCloseDialog);
 	if (my name [0]) {
@@ -319,18 +308,16 @@ static void gui_button_cb_saveAndClose (I, GuiButtonEvent event) {
 		}
 		closeDocument (me);
 	} else {
-		menu_cb_saveAs (me, Editor_getMenuCommand (me, U"File", U"Save as..."), NULL, 0, NULL, NULL, NULL);
+		menu_cb_saveAs (me, Editor_getMenuCommand (me, U"File", U"Save as..."), nullptr, 0, nullptr, nullptr, nullptr);
 	}
 }
 
-static void gui_button_cb_cancelClose (I, GuiButtonEvent event) {
-	(void) event;
+static void gui_button_cb_cancelClose (I, GuiButtonEvent /* event */) {
 	iam (TextEditor);
 	GuiThing_hide (my dirtyCloseDialog);
 }
 
-static void gui_button_cb_discardAndClose (I, GuiButtonEvent event) {
-	(void) event;
+static void gui_button_cb_discardAndClose (I, GuiButtonEvent /* event */) {
 	iam (TextEditor);
 	GuiThing_hide (my dirtyCloseDialog);
 	closeDocument (me);
@@ -343,7 +330,7 @@ void structTextEditor :: v_goAway () {
 			dirtyCloseDialog = GuiDialog_create (d_windowForm,
 				150, 70, Gui_LEFT_DIALOG_SPACING + 3 * buttonWidth + 2 * buttonSpacing + Gui_RIGHT_DIALOG_SPACING,
 					Gui_TOP_DIALOG_SPACING + Gui_TEXTFIELD_HEIGHT + Gui_VERTICAL_DIALOG_SPACING_SAME + 2 * Gui_BOTTOM_DIALOG_SPACING + Gui_PUSHBUTTON_HEIGHT,
-				U"Text changed", NULL, NULL, GuiDialog_MODAL);
+				U"Text changed", nullptr, nullptr, GuiDialog_MODAL);
 			GuiLabel_createShown (dirtyCloseDialog,
 				Gui_LEFT_DIALOG_SPACING, - Gui_RIGHT_DIALOG_SPACING,
 				Gui_TOP_DIALOG_SPACING, Gui_TOP_DIALOG_SPACING + Gui_LABEL_HEIGHT,
@@ -425,13 +412,13 @@ static bool getSelectedLines (TextEditor me, long *firstLine, long *lastLine) {
 	return true;
 }
 
-static char32 *theFindString = NULL, *theReplaceString = NULL;
+static char32 *theFindString = nullptr, *theReplaceString = nullptr;
 static void do_find (TextEditor me) {
-	if (theFindString == NULL) return;   // e.g. when the user does "Find again" before having done any "Find"
+	if (! theFindString) return;   // e.g. when the user does "Find again" before having done any "Find"
 	long left, right;
 	autostring32 text = GuiText_getStringAndSelectionPosition (my textWidget, & left, & right);
 	char32 *location = str32str (& text [right], theFindString);
-	if (location != NULL) {
+	if (location) {
 		long index = location - text.peek();
 		GuiText_setSelection (my textWidget, index, index + str32len (theFindString));
 		GuiText_scrollToSelection (my textWidget);
@@ -441,7 +428,7 @@ static void do_find (TextEditor me) {
 	} else {
 		/* Try from the start of the document. */
 		location = str32str (text.peek(), theFindString);
-		if (location != NULL) {
+		if (location) {
 			long index = location - text.peek();
 			GuiText_setSelection (my textWidget, index, index + str32len (theFindString));
 			GuiText_scrollToSelection (my textWidget);
@@ -455,7 +442,7 @@ static void do_find (TextEditor me) {
 }
 
 static void do_replace (TextEditor me) {
-	if (theReplaceString == NULL) return;   // e.g. when the user does "Replace again" before having done any "Replace"
+	if (! theReplaceString) return;   // e.g. when the user does "Replace again" before having done any "Replace"
 	autostring32 selection = GuiText_getSelection (my textWidget);
 	if (! Melder_equ (selection.peek(), theFindString)) {
 		do_find (me);
@@ -477,7 +464,7 @@ static void menu_cb_find (EDITOR_ARGS) {
 		LABEL (U"", U"Find:")
 		TEXTFIELD (U"findString", U"")
 	EDITOR_OK
-		if (theFindString != NULL) SET_STRING (U"findString", theFindString);
+		if (theFindString) SET_STRING (U"findString", theFindString);
 	EDITOR_DO
 		Melder_free (theFindString);
 		theFindString = Melder_dup_f (GET_STRING (U"findString"));
@@ -631,8 +618,7 @@ static void menu_cb_fontSize (EDITOR_ARGS) {
 	EDITOR_END
 }
 
-static void gui_text_cb_change (I, GuiTextEvent event) {
-	(void) event;
+static void gui_text_cb_change (I, GuiTextEvent /* event */) {
 	iam (TextEditor);
 	if (! my dirty) {
 		my dirty = true;
@@ -647,6 +633,7 @@ void structTextEditor :: v_createChildren () {
 
 void structTextEditor :: v_createMenus () {
 	TextEditor_Parent :: v_createMenus ();
+
 	if (v_fileBased ()) {
 		Editor_addCommand (this, U"File", U"New", 'N', menu_cb_new);
 		Editor_addCommand (this, U"File", U"Open...", 'O', menu_cb_open);
@@ -669,6 +656,7 @@ void structTextEditor :: v_createMenus () {
 	Editor_addCommand (this, U"Edit", U"Copy", 'C', menu_cb_copy);
 	Editor_addCommand (this, U"Edit", U"Paste", 'V', menu_cb_paste);
 	Editor_addCommand (this, U"Edit", U"Erase", 0, menu_cb_erase);
+
 	Editor_addMenu (this, U"Search", 0);
 	Editor_addCommand (this, U"Search", U"Find...", 'F', menu_cb_find);
 	Editor_addCommand (this, U"Search", U"Find again", 'G', menu_cb_findAgain);
@@ -677,32 +665,32 @@ void structTextEditor :: v_createMenus () {
 	Editor_addCommand (this, U"Search", U"-- line --", 0, NULL);
 	Editor_addCommand (this, U"Search", U"Where am I?", 0, menu_cb_whereAmI);
 	Editor_addCommand (this, U"Search", U"Go to line...", 'L', menu_cb_goToLine);
+
 	Editor_addMenu (this, U"Convert", 0);
 	Editor_addCommand (this, U"Convert", U"Convert to C string", 0, menu_cb_convertToCString);
-	#if defined (macintosh) || defined (UNIX) || defined (_WIN32)
-		Editor_addMenu (this, U"Font", 0);
-		Editor_addCommand (this, U"Font", U"Font size...", 0, menu_cb_fontSize);
-		fontSizeButton_10 = Editor_addCommand (this, U"Font", U"10", GuiMenu_CHECKBUTTON, menu_cb_10);
-		fontSizeButton_12 = Editor_addCommand (this, U"Font", U"12", GuiMenu_CHECKBUTTON, menu_cb_12);
-		fontSizeButton_14 = Editor_addCommand (this, U"Font", U"14", GuiMenu_CHECKBUTTON, menu_cb_14);
-		fontSizeButton_18 = Editor_addCommand (this, U"Font", U"18", GuiMenu_CHECKBUTTON, menu_cb_18);
-		fontSizeButton_24 = Editor_addCommand (this, U"Font", U"24", GuiMenu_CHECKBUTTON, menu_cb_24);
-	#endif
+
+	Editor_addMenu (this, U"Font", 0);
+	Editor_addCommand (this, U"Font", U"Font size...", 0, menu_cb_fontSize);
+	fontSizeButton_10 = Editor_addCommand (this, U"Font", U"10", GuiMenu_CHECKBUTTON, menu_cb_10);
+	fontSizeButton_12 = Editor_addCommand (this, U"Font", U"12", GuiMenu_CHECKBUTTON, menu_cb_12);
+	fontSizeButton_14 = Editor_addCommand (this, U"Font", U"14", GuiMenu_CHECKBUTTON, menu_cb_14);
+	fontSizeButton_18 = Editor_addCommand (this, U"Font", U"18", GuiMenu_CHECKBUTTON, menu_cb_18);
+	fontSizeButton_24 = Editor_addCommand (this, U"Font", U"24", GuiMenu_CHECKBUTTON, menu_cb_24);
 }
 
 void TextEditor_init (TextEditor me, const char32 *initialText) {
-	Editor_init (me, 0, 0, 600, 400, U"", NULL);
+	Editor_init (me, 0, 0, 600, 400, U"", nullptr);
 	setFontSize (me, my p_fontSize);
 	if (initialText) {
 		GuiText_setString (my textWidget, initialText);
 		my dirty = false;   // was set to true in valueChanged callback
 		Thing_setName (me, U"");
 	}
-	if (theOpenTextEditors == NULL) {
+	if (! theOpenTextEditors) {
 		theOpenTextEditors = Collection_create (classTextEditor, 100);
 		Collection_dontOwnItems (theOpenTextEditors);
 	}
-	if (theOpenTextEditors != NULL) {
+	if (theOpenTextEditors) {
 		Collection_addItem (theOpenTextEditors, me);
 	}
 }
@@ -718,7 +706,7 @@ TextEditor TextEditor_create (const char32 *initialText) {
 }
 
 void TextEditor_showOpen (TextEditor me) {
-	cb_showOpen (Editor_getMenuCommand (me, U"File", U"Open..."), NULL, NULL, NULL);
+	cb_showOpen (Editor_getMenuCommand (me, U"File", U"Open..."), nullptr, nullptr, nullptr);
 }
 
 /* End of file TextEditor.cpp */
diff --git a/sys/TextEditor.h b/sys/TextEditor.h
index b1cf08b..9b83ef8 100644
--- a/sys/TextEditor.h
+++ b/sys/TextEditor.h
@@ -24,7 +24,7 @@
 Thing_define (TextEditor, Editor) {
 	structMelderFile file;
 	GuiText textWidget;
-	UiForm openDialog, saveDialog, printDialog, findDialog;
+	autoUiForm openDialog, saveDialog;
 	bool dirty;
 	GuiDialog dirtyNewDialog, dirtyOpenDialog, dirtyCloseDialog;
 	GuiMenuItem fontSizeButton_10, fontSizeButton_12, fontSizeButton_14, fontSizeButton_18, fontSizeButton_24;
@@ -52,7 +52,7 @@ void TextEditor_init (TextEditor me,
 	const char32 *initialText
 );
 TextEditor TextEditor_create (
-	const char32 *initialText   // may be NULL
+	const char32 *initialText   // may be null
 );
 
 void TextEditor_showOpen (TextEditor me);
diff --git a/sys/Ui.cpp b/sys/Ui.cpp
index c8d1fd0..0be8ff9 100644
--- a/sys/Ui.cpp
+++ b/sys/Ui.cpp
@@ -597,7 +597,7 @@ static void commonOkCallback (UiForm /* dia */, int /* narg */, Stackel /* args
 	Interpreter interpreter, const char32 * /* invokingButtonTitle */, bool /* modified */, void *closure)
 {
 	EditorCommand cmd = (EditorCommand) closure;
-	cmd -> commandCallback (cmd -> d_editor, cmd, cmd -> d_uiform, 0, NULL, NULL, interpreter);
+	cmd -> commandCallback (cmd -> d_editor, cmd, cmd -> d_uiform.get(), 0, nullptr, nullptr, interpreter);
 }
 
 UiForm UiForm_createE (EditorCommand cmd, const char32 *title, const char32 *invokingButtonTitle, const char32 *helpTitle) {
@@ -1136,9 +1136,9 @@ void UiForm_parseString (UiForm me, const char32 *arguments, Interpreter interpr
 
 void UiForm_parseStringE (EditorCommand cmd, int narg, Stackel args, const char32 *arguments, Interpreter interpreter) {
 	if (args)
-		UiForm_call(cmd -> d_uiform, narg, args, interpreter);
+		UiForm_call (cmd -> d_uiform.get(), narg, args, interpreter);
 	else
-		UiForm_parseString (cmd -> d_uiform, arguments, interpreter);
+		UiForm_parseString (cmd -> d_uiform.get(), arguments, interpreter);
 }
 
 static UiField findField (UiForm me, const char32 *fieldName) {
diff --git a/sys/melder.cpp b/sys/melder.cpp
index bd28f76..6be1c00 100644
--- a/sys/melder.cpp
+++ b/sys/melder.cpp
@@ -300,8 +300,10 @@ static void _Melder_dia_init (GuiDialog *dia, GuiProgressBar *scale, GuiLabel *l
 	trace (U"creating the cancel button");
 	*cancelButton = GuiButton_createShown (*dia, 0, 400, 170, 170 + Gui_PUSHBUTTON_HEIGHT,
 		U"Interrupt",
-		#if gtk || macintosh
+		#if gtk
 			progress_cancel_btn_press, cancelButton,
+		#elif macintosh
+			progress_cancel_btn_press, nullptr,
 		#else
 			nullptr, nullptr,
 		#endif
diff --git a/sys/melder_audio.cpp b/sys/melder_audio.cpp
index c0a4dac..d6d9773 100644
--- a/sys/melder_audio.cpp
+++ b/sys/melder_audio.cpp
@@ -95,7 +95,7 @@ static struct {
 void Melder_audio_prefs () {
 	Preferences_addEnum (U"Audio.maximumAsynchronicity", & preferences. maximumAsynchronicity, kMelder_asynchronicityLevel, kMelder_asynchronicityLevel_DEFAULT);
 	Preferences_addEnum (U"Audio.inputSoundSystem", & preferences. inputSoundSystem, kMelder_inputSoundSystem, kMelder_inputSoundSystem_DEFAULT);
-	Preferences_addEnum (U"Audio.inputSoundSystem", & preferences. outputSoundSystem, kMelder_outputSoundSystem, kMelder_outputSoundSystem_DEFAULT);
+	Preferences_addEnum (U"Audio.outputSoundSystem", & preferences. outputSoundSystem, kMelder_outputSoundSystem, kMelder_outputSoundSystem_DEFAULT);
 	Preferences_addBool (U"Audio.useInternalSpeaker", & preferences. useInternalSpeaker, true);
 	Preferences_addDouble (U"Audio.silenceBefore2", & preferences. silenceBefore, kMelderAudio_outputSilenceBefore_DEFAULT);
 	Preferences_addDouble (U"Audio.silenceAfter2", & preferences. silenceAfter, kMelderAudio_outputSilenceAfter_DEFAULT);
diff --git a/sys/praat.h b/sys/praat.h
index a1f896b..ed93442 100644
--- a/sys/praat.h
+++ b/sys/praat.h
@@ -375,7 +375,7 @@ void praat_name2 (char32 *name, ClassInfo klas1, ClassInfo klas2);
 				int IOBJECT = 0; \
 				structMelderFile file2 = { 0 }; \
 				(void) IOBJECT; \
-				if (args == NULL && sendingString == NULL) { \
+				if (! args && ! sendingString) { \
 					file = UiFile_getFile (dia); \
 				} else { \
 					Melder_relativePathToFile (args ? args [1]. string : sendingString, & file2); \
@@ -395,7 +395,7 @@ void praat_name2 (char32 *name, ClassInfo klas1, ClassInfo klas2);
 				int IOBJECT = 0; \
 				structMelderFile file2 = { 0 }; \
 				(void) IOBJECT; \
-				if (args == NULL && sendingString == NULL) { \
+				if (! args && ! sendingString) { \
 					file = UiFile_getFile (dia); \
 				} else { \
 					Melder_relativePathToFile (args ? args [1]. string : sendingString, & file2); \
@@ -416,7 +416,7 @@ void praat_name2 (char32 *name, ClassInfo klas1, ClassInfo klas2);
 				int IOBJECT = 0; \
 				structMelderFile file2 = { 0 }; \
 				(void) IOBJECT; \
-				if (args == NULL && sendingString == NULL) { \
+				if (! args && ! sendingString) { \
 					file = UiFile_getFile (dia); \
 				} else { \
 					Melder_relativePathToFile (args ? args [1]. string : sendingString, & file2); \
diff --git a/sys/praat_version.h b/sys/praat_version.h
index 2275b19..90e7319 100644
--- a/sys/praat_version.h
+++ b/sys/praat_version.h
@@ -1,5 +1,5 @@
-#define PRAAT_VERSION_STR 6.0.04
-#define PRAAT_VERSION_NUM 6004
+#define PRAAT_VERSION_STR 6.0.05
+#define PRAAT_VERSION_NUM 6005
 #define PRAAT_YEAR 2015
 #define PRAAT_MONTH November
-#define PRAAT_DAY 1
+#define PRAAT_DAY 8

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/praat.git



More information about the debian-med-commit mailing list