[med-svn] [praat] 12/14: Imported Upstream version 6.0.4

Rafael Laboissière rlaboiss-guest at moszumanska.debian.org
Sun Nov 1 19:08:31 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 5bde0afa618db856f8cf093b16c190738f9cb383
Author: Rafael Laboissiere <rafael at laboissiere.net>
Date:   Sun Nov 1 13:52:07 2015 -0200

    Imported Upstream version 6.0.4
---
 .gitignore                                |   5 +
 FFNet/FFNet_Activation_Categories.cpp     |   4 +-
 FFNet/FFNet_def.h                         |   3 +-
 artsynth/praat_Artsynth.cpp               |  34 +--
 contrib/ola/praat_contrib_Ola_KNN.cpp     |  92 +++---
 dwtools/CCA.cpp                           |  45 ++-
 dwtools/CCA.h                             |  15 +-
 dwtools/CCA_and_Correlation.cpp           |   4 +-
 dwtools/CCA_and_Correlation.h             |   4 +-
 dwtools/CCA_def.h                         |  10 +-
 dwtools/CCs_to_DTW.cpp                    |   4 +-
 dwtools/CCs_to_DTW.h                      |   4 +-
 dwtools/ClassificationTable.cpp           |  22 +-
 dwtools/ClassificationTable.h             |  13 +-
 dwtools/Configuration_AffineTransform.cpp |   8 +-
 dwtools/Configuration_AffineTransform.h   |   4 +-
 dwtools/Configuration_and_Procrustes.cpp  |   6 +-
 dwtools/Configuration_and_Procrustes.h    |   4 +-
 dwtools/DataModeler_def.h                 |   2 +-
 dwtools/Discriminant.cpp                  |   6 +-
 dwtools/Discriminant.h                    |   2 +-
 dwtools/KlattGrid.cpp                     |   9 +-
 dwtools/OptimalCeilingTier.cpp            |   1 -
 dwtools/SPINET.cpp                        |   7 +-
 dwtools/SPINET.h                          |   4 +-
 dwtools/SPINET_to_Pitch.cpp               |   4 +-
 dwtools/SPINET_to_Pitch.h                 |   5 +-
 dwtools/SSCP.cpp                          |  21 +-
 dwtools/SSCP.h                            |   6 +-
 dwtools/Sound_to_Pitch2.cpp               |  18 +-
 dwtools/Sound_to_Pitch2.h                 |   6 +-
 dwtools/Sound_to_SPINET.cpp               |  14 +-
 dwtools/Sound_to_SPINET.h                 |   4 +-
 dwtools/Sounds_to_DTW.cpp                 |   6 +-
 dwtools/Sounds_to_DTW.h                   |   4 +-
 dwtools/Spectrogram_extensions.cpp        |  44 ++-
 dwtools/Spectrogram_extensions.h          |  26 +-
 dwtools/Strings_extensions.cpp            |  57 ++--
 dwtools/Strings_extensions.h              |  38 +--
 dwtools/praat_BSS_init.cpp                |  72 ++---
 dwtools/praat_DataModeler_init.cpp        |  32 +-
 dwtools/praat_David_init.cpp              | 466 ++++++++++++++++--------------
 dwtools/praat_MDS_init.cpp                |  12 +-
 fon/manual_Script.cpp                     |  51 ++--
 fon/manual_tutorials.cpp                  |   5 +-
 fon/praat_Fon.cpp                         |   5 +-
 sys/Collection.cpp                        |   2 +-
 sys/Collection.h                          |   4 +-
 sys/Data.cpp                              |  20 +-
 sys/Data.h                                |   3 +-
 sys/DataEditor.cpp                        |  11 +-
 sys/oo.h                                  |   1 +
 sys/oo_CAN_WRITE_AS_ENCODING.h            |   3 +
 sys/oo_COPY.h                             |   3 +
 sys/oo_DESCRIPTION.h                      |   1 +
 sys/oo_DESTROY.h                          |   2 +
 sys/oo_EQUAL.h                            |   3 +
 sys/oo_READ_BINARY.h                      |  11 +
 sys/oo_READ_TEXT.h                        |  11 +
 sys/oo_WRITE_BINARY.h                     |   9 +
 sys/oo_WRITE_TEXT.h                       |  11 +
 sys/oo_undef.h                            |   1 +
 sys/praat.cpp                             |  42 +--
 sys/praat.h                               |  36 +--
 sys/praat_statistics.cpp                  |  26 +-
 sys/praat_version.h                       |   8 +-
 66 files changed, 767 insertions(+), 649 deletions(-)

diff --git a/.gitignore b/.gitignore
index 2ed53df..42fcc81 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,3 +18,8 @@ DerivedData
 *kanweg*
 
 makefile.defs
+
+# Executables
+praat
+Praat
+Praat.exe
diff --git a/FFNet/FFNet_Activation_Categories.cpp b/FFNet/FFNet_Activation_Categories.cpp
index ad45b8e..d17fa63 100644
--- a/FFNet/FFNet_Activation_Categories.cpp
+++ b/FFNet/FFNet_Activation_Categories.cpp
@@ -83,7 +83,7 @@ autoActivation FFNet_Categories_to_Activation (FFNet me, Categories thee) {
 		if (! my outputCategories) {
 			Melder_throw (U"The FFNet does not have categories.");
 		}
-		long nl =  OrderedOfString_isSubsetOf (uniq.peek(), my outputCategories.peek(), 0);
+		long nl = OrderedOfString_isSubsetOf (uniq.peek(), my outputCategories.peek(), 0);
 		if (nl == 0) {
 			Melder_throw (U"The Categories do not match the categories of the FFNet.");
 		}
@@ -91,7 +91,7 @@ autoActivation FFNet_Categories_to_Activation (FFNet me, Categories thee) {
 		autoActivation him = Activation_create (thy size, my nOutputs);
 		for (long i = 1; i <= thy size; i++) {
 			const char32 *citem = OrderedOfString_itemAtIndex_c (thee, i);
-			long pos =  OrderedOfString_indexOfItem_c (my outputCategories.peek(), citem);
+			long pos = OrderedOfString_indexOfItem_c (my outputCategories.peek(), citem);
 			if (pos < 1) {
 				Melder_throw (U"The FFNet doesn't know the category ", citem, U".");
 			}
diff --git a/FFNet/FFNet_def.h b/FFNet/FFNet_def.h
index f52d8bc..213f2f9 100644
--- a/FFNet/FFNet_def.h
+++ b/FFNet/FFNet_def.h
@@ -36,7 +36,8 @@ oo_DEFINE_CLASS (FFNet, Daata)
 	oo_INT (nonLinearityType)
 
 	oo_INT (costFunctionType)
-	oo_AUTO_OBJECT (Categories, 0, outputCategories)
+
+	oo_AUTO_COLLECTION (Categories, outputCategories, SimpleString, 0)
 
 	oo_LONG (nWeights)	/* number of weights */
 
diff --git a/artsynth/praat_Artsynth.cpp b/artsynth/praat_Artsynth.cpp
index 9eeb90f..743e536 100644
--- a/artsynth/praat_Artsynth.cpp
+++ b/artsynth/praat_Artsynth.cpp
@@ -39,7 +39,7 @@ FORM (Art_create, U"Create a default Articulation", U"Articulatory synthesis") {
 	OK2
 DO
 	autoArt me = Art_create ();
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
 FORM (Art_edit, U"View & Edit Articulation", 0) {
@@ -135,7 +135,7 @@ DO
 	LOOP {
 		iam (Artword);
 		autoArt thee = Artword_to_Art (me, GET_REAL (U"Time"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -166,7 +166,7 @@ DIRECT2 (Art_Speaker_to_VocalTract) {
 	iam_ONLY (Art);
 	thouart_ONLY (Speaker);
 	autoVocalTract him = Art_Speaker_to_VocalTract (me, thee);
-	praat_new (him.transfer(), my name, U"_", thy name);
+	praat_new (him.move(), my name, U"_", thy name);
 END2 }
 
 /***** ARTWORD & SPEAKER *****/
@@ -212,16 +212,16 @@ DO
 			& w1, iw1, & w2, iw2, & w3, iw3,
 			& p1, ip1, & p2, ip2, & p3, ip3,
 			& v1, iv1, & v2, iv2, & v3, iv3);
-	praat_new (him.transfer(), my name, U"_", thy name);
-	if (iw1) praat_new (w1.transfer(), U"width", iw1);
-	if (iw2) praat_new (w2.transfer(), U"width", iw2);
-	if (iw3) praat_new (w3.transfer(), U"width", iw3);
-	if (ip1) praat_new (p1.transfer(), U"pressure", ip1);
-	if (ip2) praat_new (p2.transfer(), U"pressure", ip2);
-	if (ip3) praat_new (p3.transfer(), U"pressure", ip3);
-	if (iv1) praat_new (v1.transfer(), U"velocity", iv1);
-	if (iv2) praat_new (v2.transfer(), U"velocity", iv2);
-	if (iv3) praat_new (v3.transfer(), U"velocity", iv3);
+	praat_new (him.move(), my name, U"_", thy name);
+	if (iw1) praat_new (w1.move(), U"width", iw1);
+	if (iw2) praat_new (w2.move(), U"width", iw2);
+	if (iw3) praat_new (w3.move(), U"width", iw3);
+	if (ip1) praat_new (p1.move(), U"pressure", ip1);
+	if (ip2) praat_new (p2.move(), U"pressure", ip2);
+	if (ip3) praat_new (p3.move(), U"pressure", ip3);
+	if (iv1) praat_new (v1.move(), U"velocity", iv1);
+	if (iv2) praat_new (v2.move(), U"velocity", iv2);
+	if (iv3) praat_new (v3.move(), U"velocity", iv3);
 END2 }
 
 /***** ARTWORD & SPEAKER [ & SOUND ] *****/
@@ -249,7 +249,7 @@ FORM (Speaker_create, U"Create a Speaker", U"Create Speaker...") {
 	OK2
 DO
 	autoSpeaker me = Speaker_create (GET_STRING (U"Kind of speaker"), Melder_atoi (GET_STRING (U"Number of tubes in glottis")));
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END2 }
 
 DIRECT2 (Speaker_help) {
@@ -285,7 +285,7 @@ FORM (VocalTract_createFromPhone, U"Create Vocal Tract from phone", U"Create Voc
 	OK2
 DO
 	autoVocalTract me = VocalTract_createFromPhone (GET_STRING (U"Phone"));
-	praat_new (me.transfer(), GET_STRING (U"Phone"));
+	praat_new (me.move(), GET_STRING (U"Phone"));
 END2 }
 
 DIRECT2 (VocalTract_draw) {
@@ -322,7 +322,7 @@ DIRECT2 (VocalTract_to_Matrix) {
 	WHERE (SELECTED) {
 		iam_LOOP (VocalTract);
 		autoMatrix thee = VocalTract_to_Matrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
@@ -340,7 +340,7 @@ DO
 		autoSpectrum thee = VocalTract_to_Spectrum (me, GET_INTEGER (U"Number of frequencies"),
 			GET_REAL (U"Maximum frequency"), GET_REAL (U"Glottal damping"),
 			GET_INTEGER (U"Radiation damping"), GET_INTEGER (U"Internal damping"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END2 }
 
diff --git a/contrib/ola/praat_contrib_Ola_KNN.cpp b/contrib/ola/praat_contrib_Ola_KNN.cpp
index f712d37..a9cb2e5 100644
--- a/contrib/ola/praat_contrib_Ola_KNN.cpp
+++ b/contrib/ola/praat_contrib_Ola_KNN.cpp
@@ -45,7 +45,7 @@ FORM (KNN_create, U"Create kNN Classifier", U"kNN classifiers 1. What is a kNN c
 	OK2
 DO
 	autoKNN knn = KNN_create ();
-	praat_new (knn.transfer(), GET_STRING (U"Name"));
+	praat_new (knn.move(), GET_STRING (U"Name"));
 END2 }
 
 FORM (KNN_Pattern_Categories_to_KNN, U"Create kNN classifier", U"kNN classifiers 1. What is a kNN classifier?") {
@@ -73,7 +73,7 @@ DO
 		case kOla_DIMENSIONALITY_MISMATCH:
 			Melder_throw (U"The dimensionality of Pattern should be equal to that of the instance base.");
 		default:
-			praat_new (knn.transfer(), GET_STRING(U"Name"));
+			praat_new (knn.move(), GET_STRING(U"Name"));
 	}
 END2 }
 
@@ -220,20 +220,18 @@ END2 }
 
 DIRECT2 (KNN_extractInputPatterns) {
 	iam_ONLY (KNN);
-	if (my nInstances > 0) {
-		praat_new (Data_copy (my input), U"Input Patterns");
-	} else {
+	if (my nInstances <= 0)
 		Melder_throw (U"Instance base is empty.");
-	}
+	autoPattern input = Data_copy (my input);
+	praat_new (input.move(), U"Input Patterns");
 END2 }
 
 DIRECT2 (KNN_extractOutputCategories) {
 	iam_ONLY (KNN);
-	if (my nInstances > 0) {
-		praat_new (Data_copy (my output), U"Output Categories");
-	} else {
+	if (my nInstances <= 0)
 		Melder_throw (U"Instance base is empty.");
-	}
+	autoCategories output = Data_copy (my output);
+	praat_new (output.move(), U"Output Categories");
 END2 }
 
 FORM (KNN_reset, U"Reset", U"KNN: Reset...") {
@@ -249,10 +247,9 @@ END2 }
 
 DIRECT2 (KNN_shuffle) {
 	iam_ONLY (KNN);
-	if (my nInstances > 0)  
-		KNN_shuffleInstances (me);
-	else
+	if (my nInstances <= 0)
 		Melder_throw (U"Instance base is empty.");
+	KNN_shuffleInstances (me);
 END2 }
 
 FORM (KNN_prune, U"Pruning", U"KNN: Prune...") {
@@ -262,7 +259,7 @@ FORM (KNN_prune, U"Pruning", U"KNN: Prune...") {
 	OK2
 DO
 	iam_ONLY (KNN);
-	if (my nInstances < 1)
+	if (my nInstances <= 0)
 		Melder_throw (U"Instance base is empty.");
 	long oldn = my nInstances;   // save before it changes!
 	long k = GET_INTEGER (U"k neighbours");
@@ -331,7 +328,7 @@ FORM (KNN_evaluateWithTestSet, U"Evaluation", U"KNN & Pattern & Categories: Eval
 	OK2
 DO
 	iam_ONLY (KNN);
-	if (my nInstances < 1)
+	if (my nInstances <= 0)
 		Melder_throw (U"Instance base is empty");
 	thouart_ONLY (Pattern);
 	heis_ONLY (Categories);
@@ -368,7 +365,7 @@ FORM (KNN_evaluateWithTestSetAndFeatureWeights, U"Evaluation", U"KNN & Pattern &
 	OK2
 DO
 	iam_ONLY (KNN);
-	if (my nInstances < 1)
+	if (my nInstances <= 0)
 		Melder_throw (U"Instance base is empty");
 	Pattern p = (Pattern) ONLY (classPattern);
 	Categories c = (Categories) ONLY (classCategories);
@@ -411,7 +408,7 @@ FORM (KNN_toCategories, U"Classification", U"KNN & Pattern: To Categories...") {
 	OK2
 DO
 	iam_ONLY (KNN);
-	if (my nInstances < 1)
+	if (my nInstances <= 0)
 		Melder_throw (U"Instance base is empty.");
 	thouart_ONLY (Pattern);
 	long k = GET_INTEGER (U"k neighbours");
@@ -432,7 +429,8 @@ DO
 	if (thy nx != my input -> nx)
 		Melder_throw (U"The dimensionality of Pattern should match that of the instance base.");
 	autoFeatureWeights fws = FeatureWeights_create (thy nx);
-	praat_new (KNN_classifyToCategories (me, thee, fws.peek(), k, vt), U"Output");
+	autoCategories result = KNN_classifyToCategories (me, thee, fws.peek(), k, vt);
+	praat_new (result.move(), U"Output");
 END2 }
 
 FORM (KNN_toTableOfReal, U"Classification", U"KNN & Pattern: To TabelOfReal...") {
@@ -444,7 +442,7 @@ FORM (KNN_toTableOfReal, U"Classification", U"KNN & Pattern: To TabelOfReal...")
 	OK2
 DO
 	iam_ONLY (KNN);
-	if (my nInstances < 1)
+	if (my nInstances <= 0)
 		Melder_throw (U"Instance base is empty.");
 	thouart_ONLY (Pattern);
 	long k = GET_INTEGER (U"k neighbours");
@@ -465,7 +463,8 @@ DO
 	}
 	if (thy nx != my input -> nx)
 		Melder_throw (U"The dimensionality of Pattern should match that of the instance base.");
-	praat_new (KNN_classifyToTableOfReal (me, thee, fws.peek(), k, vt), U"Output");
+	autoTableOfReal result = KNN_classifyToTableOfReal (me, thee, fws.peek(), k, vt);
+	praat_new (result.move(), U"Output");
 END2 }
 
 FORM (KNN_toCategoriesWithFeatureWeights, U"Classification", U"KNN & Pattern & FeatureWeights: To Categories...") {
@@ -477,7 +476,7 @@ FORM (KNN_toCategoriesWithFeatureWeights, U"Classification", U"KNN & Pattern & F
 	OK2
 DO
 	iam_ONLY (KNN);
-	if (my nInstances < 1)
+	if (my nInstances <= 0)
 		Melder_throw (U"Instance base is empty.");
 	thouart_ONLY (Pattern);
 	heis_ONLY (FeatureWeights);
@@ -500,7 +499,8 @@ DO
 		Melder_throw (U"The dimensionality of Pattern should be equal to that of the instance base.");
 	if (thy nx != his fweights -> numberOfColumns)
 		Melder_throw (U"The number of feature weights should be equal to the dimensionality of the Pattern.");
-	praat_new (KNN_classifyToCategories (me, thee, him, k, vt), U"Output");
+	autoCategories result = KNN_classifyToCategories (me, thee, him, k, vt);
+	praat_new (result.move(), U"Output");
 END2 }
 
 FORM (KNN_toTableOfRealWithFeatureWeights, U"Classification", U"KNN & Pattern & FeatureWeights: To TableOfReal...") {
@@ -512,7 +512,7 @@ FORM (KNN_toTableOfRealWithFeatureWeights, U"Classification", U"KNN & Pattern &
 	OK2
 DO
 	iam_ONLY (KNN);
-	if (my nInstances < 1)
+	if (my nInstances <= 0)
 		Melder_throw (U"Instance base is empty.");
 	thouart_ONLY (Pattern);
 	heis_ONLY (FeatureWeights);
@@ -533,7 +533,8 @@ DO
 			vt = kOla_FLAT_VOTING;
 			break;
 	}
-	praat_new (KNN_classifyToTableOfReal (me, thee, him, k, vt), U"Output");
+	autoTableOfReal result = KNN_classifyToTableOfReal (me, thee, him, k, vt);
+	praat_new (result.move(), U"Output");
 END2 }
 
 /////////////////////////////////////////////////////////////////////////////////////////
@@ -558,7 +559,8 @@ DO
 		if (rc > 1 || rc <= 0)
 			Melder_throw (U"Please select a value of the cluster size ratio constraint c such that 0 < c <= 1.");
 		autoFeatureWeights fws = FeatureWeights_create (my nx);
-		praat_new (Pattern_to_Categories_cluster (me, fws.peek(), k, rc, rs), U"Output");
+		autoCategories result = Pattern_to_Categories_cluster (me, fws.peek(), k, rc, rs);
+		praat_new (result.move(), U"Output");
 	} else {
 		Melder_throw (U"Pattern is empty.");
 	}
@@ -584,7 +586,8 @@ DO
 		double rc =  GET_REAL(U"Cluster size ratio constraint");
 		if (rc > 1 || rc <= 0)
 			Melder_throw (U"Please select a value of the cluster size ratio constraint c such that 0 < c <= 1.");
-		praat_new (Pattern_to_Categories_cluster (me, thee, k, rc, rs), U"Output");
+		autoCategories result = Pattern_to_Categories_cluster (me, thee, k, rc, rs);
+		praat_new (result.move(), U"Output");
 	} else {
 		Melder_throw (U"Pattern is empty.");
 	}
@@ -597,7 +600,8 @@ END2 }
 DIRECT2 (KNN_patternToDissimilarity) {
 	iam_ONLY (Pattern);
 	autoFeatureWeights fws = FeatureWeights_create (my nx);
-	praat_new (KNN_patternToDissimilarity (me, fws.peek()), U"Output");
+	autoDissimilarity result = KNN_patternToDissimilarity (me, fws.peek());
+	praat_new (result.move(), U"Output");
 END2 }
 
 DIRECT2 (KNN_patternToDissimilarityWithFeatureWeights) {
@@ -605,7 +609,8 @@ DIRECT2 (KNN_patternToDissimilarityWithFeatureWeights) {
 	thouart_ONLY (FeatureWeights);  
 	if (my nx != thy fweights -> numberOfColumns)
 		Melder_throw (U"The number of features and the number of feature weights should be equal.");
-	praat_new (KNN_patternToDissimilarity (me, thee), U"Output");
+	autoDissimilarity result = KNN_patternToDissimilarity (me, thee);
+	praat_new (result.move(), U"Output");
 END2 }
 
 /////////////////////////////////////////////////////////////////////////////////////////
@@ -630,7 +635,8 @@ DO
 	double temp_start = GET_REAL (U"Initial temperature");
 	double temp_damp = GET_REAL (U"Damping factor");
 	double temp_stop = GET_REAL (U"Final temperature");
-	praat_new (KNN_SA_ToPermutation (me, tries, iterations, step_size, bolzmann_c, temp_start, temp_damp, temp_stop), U"Output");
+	autoPermutation result = KNN_SA_ToPermutation (me, tries, iterations, step_size, bolzmann_c, temp_start, temp_damp, temp_stop);
+	praat_new (result.move(), U"Output");
 END2 }
 
 /////////////////////////////////////////////////////////////////////////////////////////
@@ -647,7 +653,8 @@ DO
 		Melder_throw (U"The Pattern object should contain at least 2 rows.");
 	if (my ny != thy size)
 		Melder_throw (U"The number of rows in the Pattern object should equal the number of categories in the Categories object.");
-	praat_new (FeatureWeights_compute (me, thee, GET_INTEGER (U"Number of neighbours")), U"Output");
+	autoFeatureWeights result = FeatureWeights_compute (me, thee, GET_INTEGER (U"Number of neighbours"));
+	praat_new (result.move(), U"Output");
 END2 }
 
 FORM (FeatureWeights_computeWrapperExt, U"Feature weights", U"KNN & Pattern & Categories: To FeatureWeights..") {
@@ -665,7 +672,7 @@ FORM (FeatureWeights_computeWrapperExt, U"Feature weights", U"KNN & Pattern & Ca
 	OK2
 DO
 	iam_ONLY (KNN);
-	if (my nInstances < 1)
+	if (my nInstances <= 0)
 		Melder_throw (U"Instance base is empty");
 	thouart_ONLY (Pattern);
 	heis_ONLY (Categories);
@@ -686,8 +693,9 @@ DO
 		Melder_throw (U"Please select a value of k such that 0 < k < ", my nInstances + 1, U".");
 	if (thy nx != my input -> nx)
 		Melder_throw (U"The dimensionality of Pattern should be equal to that of the instance base.");
-	praat_new (FeatureWeights_computeWrapperExt (me, thee, him, k, mode, GET_INTEGER (U"Number of seeds"),
-		GET_REAL (U"Learning rate"), GET_REAL (U"Stop at"), (int) GET_INTEGER (U"Optimization")), U"Output");
+	autoFeatureWeights result = FeatureWeights_computeWrapperExt (me, thee, him, k, mode, GET_INTEGER (U"Number of seeds"),
+		GET_REAL (U"Learning rate"), GET_REAL (U"Stop at"), (int) GET_INTEGER (U"Optimization"));
+	praat_new (result.move(), U"Output");
 END2 }
 
 FORM (FeatureWeights_computeWrapperInt, U"Feature weights", U"KNN: To FeatureWeights...") {
@@ -734,8 +742,9 @@ DO
 	long k = GET_INTEGER (U"k neighbours");
 	if (k < 1 || k > my nInstances)
 		Melder_throw (U"Please select a value of k such that 0 < k < ", my nInstances + 1, U".");
-	praat_new (FeatureWeights_computeWrapperInt (me, k, mode, GET_INTEGER (U"Number of seeds"), GET_REAL (U"Learning rate"),
-		GET_REAL (U"Stop at"), (int) GET_INTEGER (U"Optimization"), emode), U"Output");
+	autoFeatureWeights result = FeatureWeights_computeWrapperInt (me, k, mode, GET_INTEGER (U"Number of seeds"), GET_REAL (U"Learning rate"),
+		GET_REAL (U"Stop at"), (int) GET_INTEGER (U"Optimization"), emode);
+	praat_new (result.move(), U"Output");
 END2 }
 
 /////////////////////////////////////////////////////////////////////////////////////////
@@ -748,14 +757,16 @@ FORM (Pattern_create, U"Create Pattern", 0) {
 	NATURAL (U"Number of patterns", U"1")
 	OK2
 DO
-	praat_new (Pattern_create (GET_INTEGER (U"Number of patterns"), GET_INTEGER (U"Dimension of a pattern")), GET_STRING (U"Name"));
+	autoPattern result = Pattern_create (GET_INTEGER (U"Number of patterns"), GET_INTEGER (U"Dimension of a pattern"));
+	praat_new (result.move(), GET_STRING (U"Name"));
 END2 }
 
 FORM (Categories_create, U"Create Categories", 0) {
 	WORD (U"Name", U"empty")
 	OK2
 DO
-	praat_new (Categories_create ().transfer(), GET_STRING (U"Name"));
+	autoCategories result = Categories_create ();
+	praat_new (result.move(), GET_STRING (U"Name"));
 END2 }
 
 FORM (FeatureWeights_create, U"Create FeatureWeights", 0) {
@@ -763,7 +774,8 @@ FORM (FeatureWeights_create, U"Create FeatureWeights", 0) {
 	NATURAL (U"Number of weights", U"1")
 	OK2
 DO
-	praat_new (FeatureWeights_create (GET_INTEGER (U"Number of weights")), GET_STRING (U"Name"));
+	autoFeatureWeights result = FeatureWeights_create (GET_INTEGER (U"Number of weights"));
+	praat_new (result.move(), GET_STRING (U"Name"));
 END2 }
 
 /////////////////////////////////////////////////////////////////////////////////////////
@@ -776,7 +788,7 @@ END2 }
 
 DIRECT (KNN_debug_KNN_SA_partition)
     Pattern p = ONLY (classPattern);
-    Pattern output = Pattern_create (p->ny, p->nx);
+    autoPattern output = Pattern_create (p->ny, p->nx);
     autoNUMvector <long> result (0, p->ny);
     KNN_SA_partition (p, 1, p->ny, result);
 
@@ -789,7 +801,7 @@ DIRECT (KNN_debug_KNN_SA_partition)
                 ++k;
             }
 
-    praat_new (output, U"Output");
+    praat_new (output.move(), U"Output");
 
 END
 
diff --git a/dwtools/CCA.cpp b/dwtools/CCA.cpp
index 463e17e..73d85e3 100644
--- a/dwtools/CCA.cpp
+++ b/dwtools/CCA.cpp
@@ -65,7 +65,7 @@ void structCCA :: v_info () {
 
 Thing_implement (CCA, Daata, 0);
 
-CCA CCA_create (long numberOfCoefficients, long ny, long nx) {
+autoCCA CCA_create (long numberOfCoefficients, long ny, long nx) {
 	try {
 		autoCCA me = Thing_new (CCA);
 		my numberOfCoefficients = numberOfCoefficients;
@@ -73,29 +73,28 @@ CCA CCA_create (long numberOfCoefficients, long ny, long nx) {
 		my xLabels = Thing_new (Strings);
 		my y = Eigen_create (numberOfCoefficients, ny);
 		my x = Eigen_create (numberOfCoefficients, nx);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"CCA not created.");
 	}
 }
 
-void CCA_drawEigenvector (CCA me, Graphics g, int x_or_y, long ivec, long first, long last,
-                          double ymin, double ymax, int weigh, double size_mm, const char32 *mark,	int connect, int garnish) {
-	Eigen e = my x;
-	Strings labels = my xLabels;
+void CCA_drawEigenvector (CCA me, Graphics g, int x_or_y, long ivec, long first, long last, double ymin, double ymax, int weigh, double size_mm, const char32 *mark,	int connect, int garnish) {
+	Eigen e = my x.peek();
+	Strings labels = my xLabels.peek();
 	if (x_or_y == 1) {
-		e = my y; labels = my yLabels;
+		e = my y.peek();
+		labels = my yLabels.peek();
 	}
-	Eigen_drawEigenvector (e, g, ivec, first, last, ymin, ymax, weigh, size_mm, mark,
-	                       connect, labels -> strings, garnish);
+	Eigen_drawEigenvector (e, g, ivec, first, last, ymin, ymax, weigh, size_mm, mark, connect, labels -> strings, garnish);
 }
 
 double CCA_getEigenvectorElement (CCA me, int x_or_y, long ivec, long element) {
-	Eigen e = x_or_y == 1 ? my y : my x;
+	Eigen e = x_or_y == 1 ? my y.peek() : my x.peek();
 	return Eigen_getEigenvectorElement (e, ivec, element);
 }
 
-CCA TableOfReal_to_CCA (TableOfReal me, long ny) {
+autoCCA TableOfReal_to_CCA (TableOfReal me, long ny) {
 	try {
 		long n = my numberOfRows, nx = my numberOfColumns - ny;
 
@@ -208,20 +207,19 @@ CCA TableOfReal_to_CCA (TableOfReal me, long ny) {
 		NUMnormalizeRows (thy x -> eigenvectors, numberOfCoefficients, nx, 1);
 		Melder_assert (thy x -> dimension == thy xLabels -> numberOfStrings &&
 		               thy y -> dimension == thy yLabels -> numberOfStrings);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": CCA not created.");
 	}
 }
 
-TableOfReal CCA_and_TableOfReal_scores (CCA me, TableOfReal thee, long numberOfFactors) {
+autoTableOfReal CCA_and_TableOfReal_scores (CCA me, TableOfReal thee, long numberOfFactors) {
 	try {
 		long n = thy numberOfRows;
 		long nx = my x -> dimension, ny = my y -> dimension;
 
 		if (ny + nx != thy numberOfColumns) {
-			Melder_throw (U"The number of columns in the table (", thy numberOfColumns,
-				U") does not agree with the dimensions of the CCA object (ny + nx = ", ny, U" + ", nx, U").");
+			Melder_throw (U"The number of columns in the table (", thy numberOfColumns, U") does not agree with the dimensions of the CCA object (ny + nx = ", ny, U" + ", nx, U").");
 		}
 		if (numberOfFactors == 0) {
 			numberOfFactors = my numberOfCoefficients;
@@ -231,17 +229,17 @@ TableOfReal CCA_and_TableOfReal_scores (CCA me, TableOfReal thee, long numberOfF
 		}
 		autoTableOfReal him = TableOfReal_create (n, 2 * numberOfFactors);
 		NUMstrings_copyElements (thy rowLabels, his rowLabels, 1, thy numberOfRows);
-		Eigen_and_TableOfReal_project_into (my y, thee, 1, ny, him.peek(), 1, numberOfFactors);
-		Eigen_and_TableOfReal_project_into (my x, thee, ny + 1, thy numberOfColumns, him.peek(), numberOfFactors + 1, his numberOfColumns);
+		Eigen_and_TableOfReal_project_into (my y.peek(), thee, 1, ny, him.peek(), 1, numberOfFactors);
+		Eigen_and_TableOfReal_project_into (my x.peek(), thee, ny + 1, thy numberOfColumns, him.peek(), numberOfFactors + 1, his numberOfColumns);
 		TableOfReal_setSequentialColumnLabels (him.peek(), 1, numberOfFactors, U"y_", 1, 1);
 		TableOfReal_setSequentialColumnLabels (him.peek(), numberOfFactors + 1, his numberOfColumns, U"x_", 1, 1);
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (me, U": no TableOfReal with scores created.");
 	}
 }
 
-TableOfReal CCA_and_TableOfReal_predict (CCA me, TableOfReal thee, long from) {
+autoTableOfReal CCA_and_TableOfReal_predict (CCA me, TableOfReal thee, long from) {
 	try {
 		long ny = my y -> dimension, nx = my x -> dimension;
 		long nev = my y -> numberOfEigenvalues;
@@ -265,7 +263,7 @@ TableOfReal CCA_and_TableOfReal_predict (CCA me, TableOfReal thee, long from) {
 
 		// ???? dimensions if nx .. ny ??
 
-		autoTableOfReal him = Eigen_and_TableOfReal_project (my x, thee, from, ny);
+		autoTableOfReal him = Eigen_and_TableOfReal_project (my x.peek(), thee, from, ny);
 		autoNUMvector<double> buf (1, ny);
 
 		// u = V a -> a = V'u
@@ -282,17 +280,17 @@ TableOfReal CCA_and_TableOfReal_predict (CCA me, TableOfReal thee, long from) {
 				his data [i][j] = t;
 			}
 		}
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (me, U": no predictions created.");
 	}
 }
 
-TableOfReal CCA_and_TableOfReal_factorLoadings (CCA me, TableOfReal thee) {
+autoTableOfReal CCA_and_TableOfReal_factorLoadings (CCA me, TableOfReal thee) {
 	try {
 		autoCorrelation c = TableOfReal_to_Correlation (thee);
 		autoTableOfReal him = CCA_and_Correlation_factorLoadings (me, c.peek());
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (me, U": no factor loadings created.");
 	}
@@ -302,7 +300,6 @@ double CCA_getCorrelationCoefficient (CCA me, long index) {
 	if (index < 1 || index > my numberOfCoefficients) {
 		return NUMundefined;
 	}
-
 	return sqrt (my y -> eigenvalues[index]);
 }
 
diff --git a/dwtools/CCA.h b/dwtools/CCA.h
index db75341..5aa8b2f 100644
--- a/dwtools/CCA.h
+++ b/dwtools/CCA.h
@@ -2,7 +2,7 @@
 #define _CCA_h_
 /* CCA.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
@@ -50,14 +50,14 @@ oo_CLASS_CREATE (CCA, Daata);
 	uncorrelated with c1[1] and c2[1], and so on, for all p possible pairs.
 */
 
-CCA CCA_create (long numberOfCoefficients, long ny, long nx);
+autoCCA CCA_create (long numberOfCoefficients, long ny, long nx);
 
 void CCA_drawEigenvector (CCA me, Graphics g, int x_or_y, long ivec, long first, long last,
 	double ymin, double ymax, int weigh, double size_mm, const char32 *mark, int connect, int garnish);
 
 double CCA_getEigenvectorElement (CCA me, int x_or_y, long ivec, long element);
 
-CCA TableOfReal_to_CCA (TableOfReal me, long ny);
+autoCCA TableOfReal_to_CCA (TableOfReal me, long ny);
 /*
 	Solves the canonical correlation analysis equations:
 
@@ -100,7 +100,7 @@ CCA TableOfReal_to_CCA (TableOfReal me, long ny);
 	X2 = V2*inv(D2)*U
 */
 
-TableOfReal CCA_and_TableOfReal_scores (CCA me, TableOfReal thee, long numberOfFactors);
+autoTableOfReal CCA_and_TableOfReal_scores (CCA me, TableOfReal thee, long numberOfFactors);
 /*
 	Return the factors in a table with 2*numberOfFactors columns.
 	The first 'numberOfFactors' columns are the scores for the dependent part
@@ -108,7 +108,7 @@ TableOfReal CCA_and_TableOfReal_scores (CCA me, TableOfReal thee, long numberOfF
 	independent part.
 */
 
-TableOfReal CCA_and_TableOfReal_factorLoadings (CCA me, TableOfReal thee);
+autoTableOfReal CCA_and_TableOfReal_factorLoadings (CCA me, TableOfReal thee);
 /*
 	Get the canonical factor loadings (also structure correlation coefficients),
 	the correlation of a canonical variable with an original variable.
@@ -116,10 +116,9 @@ TableOfReal CCA_and_TableOfReal_factorLoadings (CCA me, TableOfReal thee);
 
 double CCA_getCorrelationCoefficient (CCA me, long index);
 
-void CCA_getZeroCorrelationProbability (CCA me, long index, double *chisq,
-	long *ndf, double *probability);
+void CCA_getZeroCorrelationProbability (CCA me, long index, double *chisq, long *ndf, double *probability);
 
-TableOfReal CCA_and_TableOfReal_predict (CCA me, TableOfReal thee, long from);
+autoTableOfReal CCA_and_TableOfReal_predict (CCA me, TableOfReal thee, long from);
 /*
 	Given independent table, predict the dependent one, on the basis of
 	the canonical correlations.
diff --git a/dwtools/CCA_and_Correlation.cpp b/dwtools/CCA_and_Correlation.cpp
index 540c5ea..3dae10f 100644
--- a/dwtools/CCA_and_Correlation.cpp
+++ b/dwtools/CCA_and_Correlation.cpp
@@ -27,7 +27,7 @@
 #include "CCA_and_Correlation.h"
 #include "NUM2.h"
 
-TableOfReal CCA_and_Correlation_factorLoadings (CCA me, Correlation thee) {
+autoTableOfReal CCA_and_Correlation_factorLoadings (CCA me, Correlation thee) {
 	try {
 		long ny = my y -> dimension, nx = my x -> dimension;
 
@@ -57,7 +57,7 @@ TableOfReal CCA_and_Correlation_factorLoadings (CCA me, Correlation thee) {
 				his data[my numberOfCoefficients + j][i] = t;
 			}
 		}
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (U"TableOfReal not created from CCA & Correlation.");
 	}
diff --git a/dwtools/CCA_and_Correlation.h b/dwtools/CCA_and_Correlation.h
index 44967e6..e68bef5 100644
--- a/dwtools/CCA_and_Correlation.h
+++ b/dwtools/CCA_and_Correlation.h
@@ -2,7 +2,7 @@
 #define _CCA_and_Correlation_h_
 /* CCA_and_Correlation.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
@@ -28,7 +28,7 @@
 #include "CCA.h"
 #include "SSCP.h"
 
-TableOfReal CCA_and_Correlation_factorLoadings (CCA me, Correlation thee);
+autoTableOfReal CCA_and_Correlation_factorLoadings (CCA me, Correlation thee);
 /*
 	Get the canonical factor loadings (also structure correlation coefficients),
 	the correlation of a canonical variable with an original variable.
diff --git a/dwtools/CCA_def.h b/dwtools/CCA_def.h
index 37f87ca..484c630 100644
--- a/dwtools/CCA_def.h
+++ b/dwtools/CCA_def.h
@@ -1,6 +1,6 @@
 /* CCA_def.h
  * 
- * Copyright (C) 1993-2008 David Weenink
+ * Copyright (C) 1993-2008, 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
@@ -30,10 +30,10 @@ oo_DEFINE_CLASS (CCA, Daata)
 
 	oo_LONG (numberOfCoefficients)
 	oo_LONG (numberOfObservations)
-	oo_OBJECT (Strings, 0, yLabels)
-	oo_OBJECT (Strings, 0, xLabels)
-	oo_OBJECT(Eigen, 0, y)
-	oo_OBJECT(Eigen, 0, x)
+	oo_AUTO_OBJECT (Strings, 0, yLabels)
+	oo_AUTO_OBJECT (Strings, 0, xLabels)
+	oo_AUTO_OBJECT(Eigen, 0, y)
+	oo_AUTO_OBJECT(Eigen, 0, x)
 
 	#if oo_DECLARING
 		void v_info ()
diff --git a/dwtools/CCs_to_DTW.cpp b/dwtools/CCs_to_DTW.cpp
index e5b8a4a..cf0ee53 100644
--- a/dwtools/CCs_to_DTW.cpp
+++ b/dwtools/CCs_to_DTW.cpp
@@ -55,7 +55,7 @@ static void regression (CC me, long frame, double r[], long nr) {
 	}
 }
 
-DTW CCs_to_DTW (CC me, CC thee, double wc, double wle, double wr, double wer, double dtr) {
+autoDTW CCs_to_DTW (CC me, CC thee, double wc, double wle, double wr, double wer, double dtr) {
 	try {
 		if (my maximumNumberOfCoefficients != thy maximumNumberOfCoefficients) {
 			Melder_throw (U"CC orders must be equal.");
@@ -134,7 +134,7 @@ DTW CCs_to_DTW (CC me, CC thee, double wc, double wle, double wr, double wer, do
 				Melder_progress (0.999 * i / my nx, U"Calculate distances: frame ", i, U" from ", my nx, U".");
 			}
 		}
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (U"DTW not created from CCs.");
 	}
diff --git a/dwtools/CCs_to_DTW.h b/dwtools/CCs_to_DTW.h
index a47f0b6..b2ceac1 100644
--- a/dwtools/CCs_to_DTW.h
+++ b/dwtools/CCs_to_DTW.h
@@ -4,7 +4,7 @@
  *
  *	Dynamic Time Warp of two CCs.
  *
- * 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
@@ -30,7 +30,7 @@
 #include "DTW.h"
 
 
-DTW CCs_to_DTW (CC me, CC thee, double wc, double wle, double wr, double wer, double dtr);
+autoDTW CCs_to_DTW (CC me, CC thee, double wc, double wle, double wr, double wer, double dtr);
 /*
 	1. Calculate distances between CCs:
 		Distance between frame i (from me) and j (from thee) is
diff --git a/dwtools/ClassificationTable.cpp b/dwtools/ClassificationTable.cpp
index 371601a..70f26a6 100644
--- a/dwtools/ClassificationTable.cpp
+++ b/dwtools/ClassificationTable.cpp
@@ -34,25 +34,25 @@
 
 Thing_implement (ClassificationTable, TableOfReal, 0);
 
-ClassificationTable ClassificationTable_create (long numberOfRows, long numberOfClasses) {
+autoClassificationTable ClassificationTable_create (long numberOfRows, long numberOfClasses) {
 	try {
 		autoClassificationTable me = Thing_new (ClassificationTable);
 		TableOfReal_init (me.peek(), numberOfRows, numberOfClasses );
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"ClassificationTable not created.");
 	}
 }
 
-Confusion ClassificationTable_to_Confusion (ClassificationTable me, int onlyClassLabels) {
+autoConfusion ClassificationTable_to_Confusion (ClassificationTable me, bool onlyClassLabels) {
 	try {
 		autoStrings responses = TableOfReal_extractColumnLabelsAsStrings (me);
 		autoStrings s2 = TableOfReal_extractRowLabelsAsStrings (me);
 		autoDistributions d2 = Strings_to_Distributions (s2.peek());
 		autoStrings stimuli = TableOfReal_extractRowLabelsAsStrings (d2.peek());
-		autoConfusion thee = Confusion_createFromStringses ((onlyClassLabels ? responses.peek() : stimuli.peek()), responses.peek());
+		autoConfusion thee = Confusion_createFromStringses (( onlyClassLabels ? responses.peek() : stimuli.peek() ), responses.peek());
 		Confusion_and_ClassificationTable_increase (thee.peek(), me);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": confusions cannot be calculated.");
 	}
@@ -68,7 +68,7 @@ void Confusion_and_ClassificationTable_increase (Confusion me, ClassificationTab
 	}
 }
 
-Strings ClassificationTable_to_Strings_maximumProbability (ClassificationTable me) {
+autoStrings ClassificationTable_to_Strings_maximumProbability (ClassificationTable me) {
 	try {
 		autoStrings thee = Strings_createFixedLength (my numberOfRows);
 
@@ -84,13 +84,13 @@ Strings ClassificationTable_to_Strings_maximumProbability (ClassificationTable m
 				Strings_replace (thee.peek(), i, my columnLabels[col]);
 			}
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": strings cannot be created.");
 	}
 }
 
-Categories ClassificationTable_to_Categories_maximumProbability (ClassificationTable me) {
+autoCategories ClassificationTable_to_Categories_maximumProbability (ClassificationTable me) {
 	try {
 		autoCategories thee = Categories_create ();
 		for (long i = 1; i <= my numberOfRows; i++) {
@@ -103,13 +103,13 @@ Categories ClassificationTable_to_Categories_maximumProbability (ClassificationT
 			}
 			OrderedOfString_append (thee.peek(), my columnLabels[col]);
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": no Categories created.");
 	}
 }
 
-Correlation ClassificationTable_to_Correlation_columns (ClassificationTable me) {
+autoCorrelation ClassificationTable_to_Correlation_columns (ClassificationTable me) {
 	try {
 		autoCorrelation thee = Correlation_create (my numberOfColumns);
 		for (long icol = 1; icol <= thy numberOfColumns; icol++) {
@@ -134,7 +134,7 @@ Correlation ClassificationTable_to_Correlation_columns (ClassificationTable me)
 			}
 		}
 		thy numberOfObservations = my numberOfRows;
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": no correlation created.");
 	}
diff --git a/dwtools/ClassificationTable.h b/dwtools/ClassificationTable.h
index be25084..16c9fe4 100644
--- a/dwtools/ClassificationTable.h
+++ b/dwtools/ClassificationTable.h
@@ -2,7 +2,7 @@
 #define _ClassificationTable_h_
 /* ClassificationTable.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
@@ -29,15 +29,16 @@
 Thing_define (ClassificationTable, TableOfReal) {
 };
 
-ClassificationTable ClassificationTable_create (long numberOfRows, long numberOfColumns);
+autoClassificationTable ClassificationTable_create (long numberOfRows, long numberOfColumns);
 
-Categories ClassificationTable_to_Categories_maximumProbability (ClassificationTable me);
-Strings ClassificationTable_to_Strings_maximumProbability (ClassificationTable me);
+autoCategories ClassificationTable_to_Categories_maximumProbability (ClassificationTable me);
 
-Confusion ClassificationTable_to_Confusion (ClassificationTable me, int onlyClassLabels);
+autoStrings ClassificationTable_to_Strings_maximumProbability (ClassificationTable me);
+
+autoConfusion ClassificationTable_to_Confusion (ClassificationTable me, bool onlyClassLabels);
 
 /* Correlations between the classes (columns) */
-Correlation ClassificationTable_to_Correlation_columns (ClassificationTable me);
+autoCorrelation ClassificationTable_to_Correlation_columns (ClassificationTable me);
 
 void Confusion_and_ClassificationTable_increase (Confusion me, ClassificationTable thee);
 
diff --git a/dwtools/Configuration_AffineTransform.cpp b/dwtools/Configuration_AffineTransform.cpp
index fa4e016..4625e53 100644
--- a/dwtools/Configuration_AffineTransform.cpp
+++ b/dwtools/Configuration_AffineTransform.cpp
@@ -178,7 +178,7 @@ static void NUMmaximizeCongruence (double **b, double **a, long nr, long nc, dou
 	} while (fabs (f_old - f) / f_old > tolerance && numberOfIterations < maximumNumberOfIterations);
 }
 
-AffineTransform Configurations_to_AffineTransform_congruence (Configuration me, Configuration thee, long maximumNumberOfIterations, double tolerance) {
+autoAffineTransform Configurations_to_AffineTransform_congruence (Configuration me, Configuration thee, long maximumNumberOfIterations, double tolerance) {
 	try {
 		// Use Procrustes transform to obtain starting configuration.
 		// (We only need the transformation matrix T.)
@@ -187,13 +187,13 @@ AffineTransform Configurations_to_AffineTransform_congruence (Configuration me,
 
 		autoAffineTransform at = AffineTransform_create (p -> n);
 		NUMmatrix_copyElements (p -> r, at -> r, 1, p -> n, 1, p -> n);
-		return at.transfer();
+		return at;
 	} catch (MelderError) {
 		Melder_throw (me, U": no congruence transformation created.");
 	}
 }
 
-Configuration Configuration_and_AffineTransform_to_Configuration (Configuration me, AffineTransform thee) {
+autoConfiguration Configuration_and_AffineTransform_to_Configuration (Configuration me, AffineTransform thee) {
 	try {
 		if (my numberOfColumns != thy n) {
 			Melder_throw (U"Dimensions do not agree.");
@@ -203,7 +203,7 @@ Configuration Configuration_and_AffineTransform_to_Configuration (Configuration
 		// Apply transformation YT
 
 		thy v_transform (my data, my numberOfRows, his data);
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (U"Configuration not created.");
 	}
diff --git a/dwtools/Configuration_AffineTransform.h b/dwtools/Configuration_AffineTransform.h
index 144d8fa..7cb4741 100644
--- a/dwtools/Configuration_AffineTransform.h
+++ b/dwtools/Configuration_AffineTransform.h
@@ -27,8 +27,8 @@
 #include "Configuration.h"
 #include "AffineTransform.h"
 
-AffineTransform Configurations_to_AffineTransform_congruence (Configuration me,	Configuration thee, long maximumNumberOfIterations, double tolerance);
+autoAffineTransform Configurations_to_AffineTransform_congruence (Configuration me,	Configuration thee, long maximumNumberOfIterations, double tolerance);
 
-Configuration Configuration_and_AffineTransform_to_Configuration (Configuration me, AffineTransform thee);
+autoConfiguration Configuration_and_AffineTransform_to_Configuration (Configuration me, AffineTransform thee);
 
 #endif /* _Configuration_AffineTransform_h_ */
diff --git a/dwtools/Configuration_and_Procrustes.cpp b/dwtools/Configuration_and_Procrustes.cpp
index 161f503..af82cad 100644
--- a/dwtools/Configuration_and_Procrustes.cpp
+++ b/dwtools/Configuration_and_Procrustes.cpp
@@ -1,6 +1,6 @@
 /* Configuration_and_Procrustes.c
  *
- * 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 @@
 #include "Configuration_and_Procrustes.h"
 #include "NUM2.h"
 
-Procrustes Configurations_to_Procrustes (Configuration me, Configuration thee, int orthogonal) {
+autoProcrustes Configurations_to_Procrustes (Configuration me, Configuration thee, int orthogonal) {
 	try {
 		if (my numberOfRows != thy numberOfRows || my numberOfColumns != thy numberOfColumns) {
 			Melder_throw (U"Configurations must have the same number of points and the same dimension.");
@@ -39,7 +39,7 @@ Procrustes Configurations_to_Procrustes (Configuration me, Configuration thee, i
 			scale = & (p -> s);
 		}
 		NUMProcrustes (my data, thy data, my numberOfRows, my numberOfColumns, p -> r, translation, scale);
-		return p.transfer();
+		return p;
 	} catch (MelderError) {
 		Melder_throw (U"Procrustes from two Configurations not created.");
 	}
diff --git a/dwtools/Configuration_and_Procrustes.h b/dwtools/Configuration_and_Procrustes.h
index 5cb6a0b..98d9665 100644
--- a/dwtools/Configuration_and_Procrustes.h
+++ b/dwtools/Configuration_and_Procrustes.h
@@ -2,7 +2,7 @@
 #define _Configuration_and_Procrustes_h_
 /* Configuration_and_Procrustes.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
@@ -31,6 +31,6 @@
 	#include "Procrustes.h"
 #endif
 
-Procrustes Configurations_to_Procrustes (Configuration me, Configuration thee, int orthogonal);
+autoProcrustes Configurations_to_Procrustes (Configuration me, Configuration thee, int orthogonal);
 
 #endif /* _Configuration_and_Procrustes_h_ */
diff --git a/dwtools/DataModeler_def.h b/dwtools/DataModeler_def.h
index c62fd66..b7dc3f9 100644
--- a/dwtools/DataModeler_def.h
+++ b/dwtools/DataModeler_def.h
@@ -14,7 +14,7 @@ oo_DEFINE_CLASS (DataModeler, Function)
 	oo_INT_VECTOR (parameterStatus, numberOfParameters)
 	oo_DOUBLE (tolerance)
 	oo_INT (useSigmaY)
-	oo_OBJECT (Strings, 0, parameterNames)
+	oo_AUTO_OBJECT (Strings, 0, parameterNames)
 	oo_OBJECT (Covariance, 0, parameterCovariances)
 	#if oo_DECLARING
 		double (*f_evaluate) (DataModeler me, double x, double p[]);
diff --git a/dwtools/Discriminant.cpp b/dwtools/Discriminant.cpp
index adfeaea..59612b3 100644
--- a/dwtools/Discriminant.cpp
+++ b/dwtools/Discriminant.cpp
@@ -263,7 +263,8 @@ static long Discriminant_getDegreesOfFreedom (Discriminant me) {
 }
 
 void Discriminant_getPartialDiscriminationProbability (Discriminant me,
-        long numberOfDimensions, double *probability, double *chisq, long *ndf) {
+        long numberOfDimensions, double *probability, double *chisq, long *ndf)
+{
 	long g = my numberOfGroups;
 	long p = my dimension, k = numberOfDimensions;
 	long numberOfFunctions = Discriminant_getNumberOfFunctions (me);
@@ -288,7 +289,8 @@ void Discriminant_getPartialDiscriminationProbability (Discriminant me,
 }
 
 double Discriminant_getConcentrationEllipseArea (Discriminant me, long group,
-        double scale, int confidence, int discriminantDirections, long d1, long d2) {
+        double scale, bool confidence, int discriminantDirections, long d1, long d2)
+{
 	SSCPs groups = my groups;
 	double area = NUMundefined;
 
diff --git a/dwtools/Discriminant.h b/dwtools/Discriminant.h
index f90714a..3e281ae 100644
--- a/dwtools/Discriminant.h
+++ b/dwtools/Discriminant.h
@@ -46,7 +46,7 @@ void Discriminant_getPartialDiscriminationProbability (Discriminant me,
 	long numberOfDimensions, double *probability, double *chisq, long *ndf);
 
 double Discriminant_getConcentrationEllipseArea (Discriminant me, long group,
-	double scale, int confidence, int discriminantDirections, long d1, long d2);
+	double scale, bool confidence, int discriminantDirections, long d1, long d2);
 
 double Discriminant_getLnDeterminant_group (Discriminant me, long group);
 
diff --git a/dwtools/KlattGrid.cpp b/dwtools/KlattGrid.cpp
index 34e0325..ed780b6 100644
--- a/dwtools/KlattGrid.cpp
+++ b/dwtools/KlattGrid.cpp
@@ -1642,7 +1642,7 @@ autoSound Sound_VocalTractGrid_CouplingGrid_filter_parallel (Sound me, VocalTrac
 		if (! him) {
 			him = Data_copy (me);
 		}
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (me, U": not filtered in parallel.");
 	}
@@ -1777,7 +1777,12 @@ void _Sound_FormantGrid_filterWithOneFormant_inline (Sound me, thou, long iforma
 	}
 
 	double nyquist = 0.5 / my dx;
-	autoFilter r =  antiformant != 0 ? (autoFilter) AntiResonator_create (my dx) : (autoFilter) Resonator_create (my dx, Resonator_NORMALISATION_H0);
+	autoFilter r;
+	if (antiformant != 0) {
+		r = AntiResonator_create (my dx);
+	} else {
+		r = Resonator_create (my dx, Resonator_NORMALISATION_H0);
+	}
 
 	for (long is = 1; is <= my nx; is++) {
 		double t = my x1 + (is - 1) * my dx;
diff --git a/dwtools/OptimalCeilingTier.cpp b/dwtools/OptimalCeilingTier.cpp
index 93c202d..e051c6d 100644
--- a/dwtools/OptimalCeilingTier.cpp
+++ b/dwtools/OptimalCeilingTier.cpp
@@ -40,7 +40,6 @@ void OptimalCeilingTier_draw (OptimalCeilingTier me, Graphics g, double tmin, do
 autoTableOfReal OptimalCeilingTier_downto_TableOfReal (OptimalCeilingTier me) {
 	autoTableOfReal thee = RealTier_downto_TableOfReal (me, U"Time (s)", U"Frequency (Hz)");
 	return thee;
-
 }
 
 /* End of file OptimalCeilingTier.cpp */
diff --git a/dwtools/SPINET.cpp b/dwtools/SPINET.cpp
index 1455d65..9c96f91 100644
--- a/dwtools/SPINET.cpp
+++ b/dwtools/SPINET.cpp
@@ -63,20 +63,19 @@ void structSPINET :: v_info () {
 	MelderInfo_writeLine (U"Maximum powerrectified: ", maxs);
 }
 
-SPINET SPINET_create (double tmin, double tmax, long nt, double dt, double t1, double minimumFrequency, double maximumFrequency, long nFilters, double excitationErbProportion, double inhibitionErbProportion) {
+autoSPINET SPINET_create (double tmin, double tmax, long nt, double dt, double t1, double minimumFrequency, double maximumFrequency, long nFilters, double excitationErbProportion, double inhibitionErbProportion) {
 	try {
 		autoSPINET me = Thing_new (SPINET);
 		double minErb = NUMhertzToErb (minimumFrequency);
 		double maxErb = NUMhertzToErb (maximumFrequency);
 		double dErb = (maxErb - minErb) / nFilters;
-		Sampled2_init (me.peek(), tmin, tmax, nt, dt, t1,
-		               minErb - dErb / 2.0, maxErb + dErb / 2.0, nFilters, dErb, minErb);
+		Sampled2_init (me.peek(), tmin, tmax, nt, dt, t1, minErb - dErb / 2.0, maxErb + dErb / 2.0, nFilters, dErb, minErb);
 		my y = NUMmatrix<double> (1, nFilters, 1, nt);
 		my s = NUMmatrix<double> (1, nFilters, 1, nt);
 		my gamma = 4;
 		my excitationErbProportion = excitationErbProportion;
 		my inhibitionErbProportion = inhibitionErbProportion;
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"SPINET not created.");
 	}
diff --git a/dwtools/SPINET.h b/dwtools/SPINET.h
index ce17d2c..4ca761c 100644
--- a/dwtools/SPINET.h
+++ b/dwtools/SPINET.h
@@ -2,7 +2,7 @@
 #define _SPINET_h_
 /* SPINET.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
@@ -31,7 +31,7 @@
 #include "SPINET_def.h"
 oo_CLASS_CREATE (SPINET, Sampled2);
 
-SPINET SPINET_create (double tmin, double tmax, long nt, double dt, double t1,
+autoSPINET SPINET_create (double tmin, double tmax, long nt, double dt, double t1,
 	 double minimumFrequency, double maximumFrequency, long nFilters,
 	 double excitationErbProportion, double inhibitionErbProportion);
 
diff --git a/dwtools/SPINET_to_Pitch.cpp b/dwtools/SPINET_to_Pitch.cpp
index 3c462af..1cea161 100644
--- a/dwtools/SPINET_to_Pitch.cpp
+++ b/dwtools/SPINET_to_Pitch.cpp
@@ -31,7 +31,7 @@
 	from Erb-scale to log2-scale
 */
 
-Pitch SPINET_to_Pitch (SPINET me, double harmonicFallOffSlope, double ceiling, int maxnCandidates) {
+autoPitch SPINET_to_Pitch (SPINET me, double harmonicFallOffSlope, double ceiling, int maxnCandidates) {
 	try {
 		long nPointsPerOctave = 48;
 		double fmin = NUMerbToHertz (Sampled2_rowToY (me, 1));
@@ -135,7 +135,7 @@ Pitch SPINET_to_Pitch (SPINET me, double harmonicFallOffSlope, double ceiling, i
 			Pitch_Frame_getPitch (&thy frame[j], &f0, &localStrength);
 			Pitch_Frame_resizeStrengths (&thy frame[j], localStrength / maxStrength, unvoicedCriterium);
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": no Pitch created.");
 	}
diff --git a/dwtools/SPINET_to_Pitch.h b/dwtools/SPINET_to_Pitch.h
index e198c45..0e278d1 100644
--- a/dwtools/SPINET_to_Pitch.h
+++ b/dwtools/SPINET_to_Pitch.h
@@ -2,7 +2,7 @@
 #define _SPINET_to_Pitch_h_
 /* SPINET_to_Pitch.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
@@ -28,7 +28,6 @@
 #include "SPINET.h"
 #include "Pitch.h"
 
-Pitch SPINET_to_Pitch (SPINET me, double harmonicFallOffSlope, double ceiling,
-	int maxnCandidates);
+autoPitch SPINET_to_Pitch (SPINET me, double harmonicFallOffSlope, double ceiling, int maxnCandidates);
 
 #endif /* _SPINET_to_Pitch_h_ */
diff --git a/dwtools/SSCP.cpp b/dwtools/SSCP.cpp
index 071c099..7779e15 100644
--- a/dwtools/SSCP.cpp
+++ b/dwtools/SSCP.cpp
@@ -104,7 +104,7 @@ void structSSCP :: v_info () {
 	Calculate scale factor by which sqrt(eigenvalue) has to
 	be multiplied to obtain the length of an ellipse axis.
 */
-double SSCP_getEllipseScalefactor (SSCP me, double scale, int confidence) {
+double SSCP_getEllipseScalefactor (SSCP me, double scale, bool confidence) {
 	long n = (long) floor (SSCP_getNumberOfObservations (me));
 
 	if (confidence) {
@@ -341,7 +341,7 @@ SSCP SSCP_create (long dimension) {
 	}
 }
 
-double SSCP_getConcentrationEllipseArea (SSCP me, double scale, int confidence, long d1, long d2) {
+double SSCP_getConcentrationEllipseArea (SSCP me, double scale, bool confidence, long d1, long d2) {
 	long p = my numberOfRows;
 
 	if (d1 < 1 || d1 > p || d2 < 1 || d2 > p || d1 == d2) {
@@ -783,7 +783,7 @@ void SSCP_setCentroid (SSCP me, long component, double value) {
 	my centroid[component] = value;
 }
 
-CCA SSCP_to_CCA (SSCP me, long ny) {
+autoCCA SSCP_to_CCA (SSCP me, long ny) {
 	try {
 		char upper = 'L', diag = 'N';
 		long info;
@@ -904,7 +904,7 @@ CCA SSCP_to_CCA (SSCP me, long ny) {
 				for (long k = 1; k <= j; k++) {
 					t += gsvd -> q[i][k] * ri[k][j];
 				}
-				thy y ->eigenvectors[j][i] = t;
+				thy y -> eigenvectors[j][i] = t;
 			}
 		}
 
@@ -934,10 +934,10 @@ CCA SSCP_to_CCA (SSCP me, long ny) {
 		NUMnormalizeRows (thy x -> eigenvectors, thy x -> numberOfEigenvalues, nx, 1);
 
 		if (ny < nx) {
-			Eigen t = thy x;
-			thy x = thy y; thy y = t;
+			autoEigen t = thy x.move();
+			thy x = thy y.move(); thy y = t.move();
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": CCA not created.");
 	}
@@ -1001,13 +1001,14 @@ void SSCPs_getHomegeneityOfCovariances_box (SSCPs me, double *probability, doubl
 	double ln_determinant, inv = 0.0, sum = 0.0, g = my size;
 	for (long i = 1; i <= g; i++) {
 		SSCP t = (SSCP) my item[i];
-		double ni = t -> numberOfObservations - 1;
+		double ni = t -> numberOfObservations - 1.0;
 		NUMdeterminant_cholesky (t -> data, p, &ln_determinant);
 
 		// Box-test is for covariance matrices -> scale determinant.
 
 		ln_determinant -= p * log (ni);
-		sum += ni; inv += 1.0 / ni;
+		sum += ni;
+		inv += 1.0 / ni;
 		*chisq -= ni * ln_determinant;
 	}
 
@@ -1017,7 +1018,7 @@ void SSCPs_getHomegeneityOfCovariances_box (SSCPs me, double *probability, doubl
 
 	*chisq *= 1.0 - (inv - 1.0 / sum) * (2.0 * p * p + 3.0 * p - 1.0) / (6.0 * (p + 1) * (g - 1.0));
 	*ndf = (long) floor ((g - 1.0) * p * (p + 1) / 2.0);
-	*probability =  NUMchiSquareQ (*chisq, *ndf);
+	*probability = NUMchiSquareQ (*chisq, *ndf);
 }
 
 
diff --git a/dwtools/SSCP.h b/dwtools/SSCP.h
index 9dcc5e1..8e75799 100644
--- a/dwtools/SSCP.h
+++ b/dwtools/SSCP.h
@@ -44,7 +44,7 @@ void SSCP_init (SSCP me, long dimension, long storage);
 SSCP SSCP_create (long dimension);
 
 void SSCP_drawTwoDimensionalEllipse_inside  (SSCP me, Graphics g, double scale, char32 * label, int fontSize);
-double SSCP_getEllipseScalefactor (SSCP me, double scale, int confidence);
+double SSCP_getEllipseScalefactor (SSCP me, double scale, bool confidence);
 void SSCP_drawConcentrationEllipse (SSCP me, Graphics g, double scale, int confidence,
 	long d1, long d2, double xmin, double xmax, double ymin, double ymax, int garnish);
 
@@ -57,7 +57,7 @@ double SSCP_getDegreesOfFreedom (SSCP me);
 double SSCP_getTotalVariance (SSCP me);
 double SSCP_getCumulativeContributionOfComponents (SSCP me, long from, long to);
 double SSCP_getLnDeterminant (SSCP me);
-double SSCP_getConcentrationEllipseArea(SSCP me, double scale, int confidence, long d1, long d2);
+double SSCP_getConcentrationEllipseArea(SSCP me, double scale, bool confidence, long d1, long d2);
 double SSCP_getFractionVariation (SSCP me, long from, long to);
 
 SSCP TableOfReal_to_SSCP (TableOfReal me, long rowb, long rowe, long colb, long cole);
@@ -109,7 +109,7 @@ PCA SSCP_to_PCA (SSCP me);
 void SSCP_expandPCA (SSCP me);
 void SSCP_unExpandPCA (SSCP me);
 
-CCA SSCP_to_CCA (SSCP me, long ny);
+autoCCA SSCP_to_CCA (SSCP me, long ny);
 
 Covariance Covariance_create (long dimension);
 Covariance Covariance_createSimple (char32 *covars, char32 *centroid, long numberOfObservations);
diff --git a/dwtools/Sound_to_Pitch2.cpp b/dwtools/Sound_to_Pitch2.cpp
index c790d30..e59c291 100644
--- a/dwtools/Sound_to_Pitch2.cpp
+++ b/dwtools/Sound_to_Pitch2.cpp
@@ -70,7 +70,7 @@ static void spec_smoooth_SHS (double a[], long n) {
 	}
 }
 
-Pitch Sound_to_Pitch_shs (Sound me, double timeStep, double minimumPitch,
+autoPitch Sound_to_Pitch_shs (Sound me, double timeStep, double minimumPitch,
                           double maximumFrequency, double ceiling, long maxnSubharmonics, long maxnCandidates,
                           double compressionFactor, long nPointsPerOctave) {
 	try {
@@ -101,8 +101,7 @@ Pitch Sound_to_Pitch_shs (Sound me, double timeStep, double minimumPitch,
 		Sampled_shortTermAnalysis (sound.peek(), windowDuration, timeStep, &numberOfFrames, &firstTime);
 		autoSound frame = Sound_createSimple (1, frameDuration, newSamplingFrequency);
 		autoSound hamming = Sound_createHamming (nx / newSamplingFrequency, newSamplingFrequency);
-		autoPitch thee = Pitch_create (my xmin, my xmax, numberOfFrames, timeStep, firstTime,
-		                               ceiling, maxnCandidates);
+		autoPitch thee = Pitch_create (my xmin, my xmax, numberOfFrames, timeStep, firstTime, ceiling, maxnCandidates);
 		autoNUMvector<double> cc (1, numberOfFrames);
 		autoNUMvector<double> specAmp (1, nfft2);
 		autoNUMvector<double> fl2 (1, nfft2);
@@ -127,7 +126,7 @@ Pitch Sound_to_Pitch_shs (Sound me, double timeStep, double minimumPitch,
 		*/
 
 		for (long i = 2; i <= nfft2; i++) {
-			fl2[i] = NUMlog2 ( (i - 1) * df);
+			fl2[i] = NUMlog2 ((i - 1) * df);
 		}
 		fl2[1] = 2 * fl2[2] - fl2[3];
 
@@ -135,7 +134,7 @@ Pitch Sound_to_Pitch_shs (Sound me, double timeStep, double minimumPitch,
 		// the frequency weighting function.
 
 		for (long i = 1; i <= nFrequencyPoints; i++) {
-			arctg[i] = 0.5 + atan (3 * (i - atans) / nPointsPerOctave) / NUMpi;
+			arctg[i] = 0.5 + atan (3.0 * (i - atans) / nPointsPerOctave) / NUMpi;
 		}
 
 		// Perform the analysis on all frames.
@@ -148,7 +147,6 @@ Pitch Sound_to_Pitch_shs (Sound me, double timeStep, double minimumPitch,
 
 			// Copy a frame from the sound, apply a hamming window. Get local 'intensity'
 
-
 			frame -> nx = nx; /*begin vies */
 			Sound_into_Sound (sound.peek(), frame.peek(), tmid - halfWindow);
 			Sounds_multiply (frame.peek(), hamming.peek());
@@ -256,20 +254,18 @@ Pitch Sound_to_Pitch_shs (Sound me, double timeStep, double minimumPitch,
 		for (long i = 1; i <= numberOfFrames; i++) {
 			Pitch_Frame_resizeStrengths (& thy frame[i], cc[i], vuvCriterium);
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": no Pitch (shs) created.");
 	}
 }
 
-Pitch Sound_to_Pitch_SPINET (Sound me, double timeStep, double windowDuration,
-                             double minimumFrequencyHz, double maximumFrequencyHz, long nFilters,
-                             double ceiling, int maxnCandidates) {
+autoPitch Sound_to_Pitch_SPINET (Sound me, double timeStep, double windowDuration, double minimumFrequencyHz, double maximumFrequencyHz, long nFilters, double ceiling, int maxnCandidates) {
 	try {
 		autoSPINET him = Sound_to_SPINET (me, timeStep, windowDuration, minimumFrequencyHz,
 		                                  maximumFrequencyHz, nFilters, 0.4, 0.6);
 		autoPitch thee = SPINET_to_Pitch (him.peek(), 0.15, ceiling, maxnCandidates);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": no Pitch (SPINET) created.");
 	}
diff --git a/dwtools/Sound_to_Pitch2.h b/dwtools/Sound_to_Pitch2.h
index c4d2117..a908b42 100644
--- a/dwtools/Sound_to_Pitch2.h
+++ b/dwtools/Sound_to_Pitch2.h
@@ -2,7 +2,7 @@
 #define _Sound_to_Pitch2_h_
 /* Sound_to_Pitch2.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
@@ -28,11 +28,11 @@
 #include "Sound_extensions.h"
 #include "Pitch.h"
 
-Pitch Sound_to_Pitch_shs (Sound me, double timeStep, double minimumPitch,
+autoPitch Sound_to_Pitch_shs (Sound me, double timeStep, double minimumPitch,
 	double maximumFrequency, double ceiling, long maxnSubharmonics, long maxnCandidates,
 	double compressionFactor, long nDivisionsPerOctave);
 
-Pitch Sound_to_Pitch_SPINET (Sound me, double timeStep, double windowDuration,
+autoPitch Sound_to_Pitch_SPINET (Sound me, double timeStep, double windowDuration,
 	double minimumFrequencyHz, double maximumFrequencyHz, long nFilters,
 	double ceiling, int maxnCandidates);
 
diff --git a/dwtools/Sound_to_SPINET.cpp b/dwtools/Sound_to_SPINET.cpp
index f38a275..23dd759 100644
--- a/dwtools/Sound_to_SPINET.cpp
+++ b/dwtools/Sound_to_SPINET.cpp
@@ -1,6 +1,6 @@
 /* Sound_to_SPINET.cpp
  *
- * Copyright (C) 1993-2013 David Weenink
+ * Copyright (C) 1993-2013, 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
@@ -38,9 +38,7 @@ static double fgamma (double x, long n) {
 	0 < minimumFrequencyHz < maximumFrequencyHz
 */
 
-SPINET Sound_to_SPINET (Sound me, double timeStep, double windowDuration,
-                        double minimumFrequencyHz, double maximumFrequencyHz, long nFilters,
-                        double excitationErbProportion, double inhibitionErbProportion) {
+autoSPINET Sound_to_SPINET (Sound me, double timeStep, double windowDuration, double minimumFrequencyHz, double maximumFrequencyHz, long nFilters, double excitationErbProportion, double inhibitionErbProportion) {
 	try {
 		double firstTime, b = 1.02, samplingFrequency = 1 / my dx;
 
@@ -53,8 +51,7 @@ SPINET Sound_to_SPINET (Sound me, double timeStep, double windowDuration,
 
 		long numberOfFrames;
 		Sampled_shortTermAnalysis (me, windowDuration, timeStep, &numberOfFrames, &firstTime);
-		autoSPINET thee = SPINET_create (my xmin, my xmax, numberOfFrames, timeStep, firstTime,
-		                                 minimumFrequencyHz, maximumFrequencyHz, nFilters, excitationErbProportion, inhibitionErbProportion);
+		autoSPINET thee = SPINET_create (my xmin, my xmax, numberOfFrames, timeStep, firstTime, minimumFrequencyHz, maximumFrequencyHz, nFilters, excitationErbProportion, inhibitionErbProportion);
 		autoSound window = Sound_createGaussian (windowDuration, samplingFrequency);
 		autoSound frame = Sound_createSimple (1, windowDuration, samplingFrequency);
 		autoNUMvector<double> f (1, nFilters);
@@ -77,8 +74,7 @@ SPINET Sound_to_SPINET (Sound me, double timeStep, double windowDuration,
 			double gammaMaxAmplitude = pow ( (thy gamma - 1) / (NUMe * bw[i]), (thy gamma - 1)); // tgammaMax
 			double timeCorrection = tgammaMax - windowDuration / 2;
 
-			autoSound gammaTone = Sound_createGammaTone (0, 0.1, samplingFrequency,
-			                      thy gamma, b, f[i], 0, 0, 0);
+			autoSound gammaTone = Sound_createGammaTone (0, 0.1, samplingFrequency, thy gamma, b, f[i], 0, 0, 0);
 			autoSound filtered = Sounds_convolve (me, gammaTone.peek(), kSounds_convolve_scaling_SUM, kSounds_convolve_signalOutsideTimeDomain_ZERO);
 
 			// To energy measure: weigh with broad-band transfer function
@@ -114,7 +110,7 @@ SPINET Sound_to_SPINET (Sound me, double timeStep, double windowDuration,
 				}
 				thy s[i][j] = a > 0 ? a : 0;
 			}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U":  no SPINET created.");
 	}
diff --git a/dwtools/Sound_to_SPINET.h b/dwtools/Sound_to_SPINET.h
index 0e8bca4..684b42b 100644
--- a/dwtools/Sound_to_SPINET.h
+++ b/dwtools/Sound_to_SPINET.h
@@ -2,7 +2,7 @@
 #define _Sound_to_SPINET_h_
 /* Sound_to_SPINET.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
@@ -28,7 +28,7 @@
 #include "SPINET.h"
 #include "Sound_extensions.h"
 
-SPINET Sound_to_SPINET (Sound me, double timeStep, double windowDuration,
+autoSPINET Sound_to_SPINET (Sound me, double timeStep, double windowDuration,
 	double minimumFrequencyHz, double maximumFrequencyHz, long nFilters,
 	double excitationErbProportion, double inhibitionErbProportion);
 
diff --git a/dwtools/Sounds_to_DTW.cpp b/dwtools/Sounds_to_DTW.cpp
index 5f10a73..615f4ae 100644
--- a/dwtools/Sounds_to_DTW.cpp
+++ b/dwtools/Sounds_to_DTW.cpp
@@ -1,6 +1,6 @@
 /* Sounds_to_DTW.cpp
  *
- * Copyright (C) 2012 David Weenink
+ * Copyright (C) 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
@@ -25,7 +25,7 @@
 #include "Sounds_to_DTW.h"
 #include "CCs_to_DTW.h"
 
-DTW Sounds_to_DTW (Sound me, Sound thee, double analysisWidth, double dt, double band, int slope) {
+autoDTW Sounds_to_DTW (Sound me, Sound thee, double analysisWidth, double dt, double band, int slope) {
 	try {
         long numberOfCoefficients = 12;
         double fmin_mel = 100, df_mel = 100, fmax_mel = 0.0;
@@ -35,7 +35,7 @@ DTW Sounds_to_DTW (Sound me, Sound thee, double analysisWidth, double dt, double
         autoDTW him = CCs_to_DTW (mfcc_me.peek(), mfcc_thee.peek(), wc, wle, wr, wer, dtr);
         autoPolygon p = DTW_to_Polygon (him.peek(), band, slope);
         DTW_and_Polygon_findPathInside (him.peek(), p.peek(), slope, 0);
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (me, U": no DTW created.");
 	}
diff --git a/dwtools/Sounds_to_DTW.h b/dwtools/Sounds_to_DTW.h
index c3ae5af..1601775 100644
--- a/dwtools/Sounds_to_DTW.h
+++ b/dwtools/Sounds_to_DTW.h
@@ -2,7 +2,7 @@
 #define _Sounds_to_DTW_h_
 /* Sounds_to_DTW.h
  *
- * Copyright (C) 2012, 2014 David Weenink
+ * Copyright (C) 2012, 2014, 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
@@ -27,6 +27,6 @@
 #include "Sound.h"
 
 
-DTW Sounds_to_DTW (Sound me, Sound thee, double analysisWidth, double dt, double band, int slope);
+autoDTW Sounds_to_DTW (Sound me, Sound thee, double analysisWidth, double dt, double band, int slope);
 
 #endif /* _Sounds_to_DTW_h_ */
diff --git a/dwtools/Spectrogram_extensions.cpp b/dwtools/Spectrogram_extensions.cpp
index ae4ea69..b8e0e91 100644
--- a/dwtools/Spectrogram_extensions.cpp
+++ b/dwtools/Spectrogram_extensions.cpp
@@ -1,6 +1,6 @@
 /* Spectrogram_extensions.cpp
  *
- * Copyright (C) 2014 David Weenink
+ * Copyright (C) 2014-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
@@ -79,7 +79,7 @@ Thing_implement (BarkSpectrogram, BandFilterSpectrogram, 1);
 
 // dbs = scaleFactor * log10 (value/reference);
 // if (dbs < floor_db) { dbs = floor_dB }
-Matrix Spectrogram_to_Matrix_dB (Spectrogram me, double reference, double scaleFactor, double floor_dB) {
+autoMatrix Spectrogram_to_Matrix_dB (Spectrogram me, double reference, double scaleFactor, double floor_dB) {
 	try {
 		autoMatrix thee = Matrix_create (my xmin, my xmax, my nx, my dx, my x1, my ymin, my ymax, my ny, my dy, my y1);
 		for (long i = 1; i <= my ny; i++) {
@@ -96,7 +96,7 @@ Matrix Spectrogram_to_Matrix_dB (Spectrogram me, double reference, double scaleF
 				thy z[i][j] = val;
 			}
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (U"Matrix with dB values not created.");
 	}
@@ -183,7 +183,7 @@ void CC_into_BandFilterSpectrogram (CC me, BandFilterSpectrogram thee, long firs
 	}
 }
 
-MelSpectrogram MFCC_to_MelSpectrogram (MFCC me, long first, long last, bool c0) {
+autoMelSpectrogram MFCC_to_MelSpectrogram (MFCC me, long first, long last, bool c0) {
 	try {
 		if (first == 0 && last == 0) { // defaults
 			first = 1; last = my maximumNumberOfCoefficients;
@@ -200,13 +200,13 @@ MelSpectrogram MFCC_to_MelSpectrogram (MFCC me, long first, long last, bool c0)
 		double df = (my fmax - my fmin) / (my maximumNumberOfCoefficients + 1 + 1);
 		autoMelSpectrogram thee = MelSpectrogram_create (my xmin, my xmax, my nx, my dx, my x1, my fmin, my fmax, my maximumNumberOfCoefficients + 1, df, df);
 		CC_into_BandFilterSpectrogram (me, thee.peek(), first, last, c0);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U"MelSpectrogram not created.");
 	}
 }
 
-MFCC MelSpectrogram_to_MFCC (MelSpectrogram me, long numberOfCoefficients) {
+autoMFCC MelSpectrogram_to_MFCC (MelSpectrogram me, long numberOfCoefficients) {
 	try {
 		if (numberOfCoefficients <= 0) {
 			numberOfCoefficients = my ny - 1;
@@ -215,17 +215,17 @@ MFCC MelSpectrogram_to_MFCC (MelSpectrogram me, long numberOfCoefficients) {
 		// 20130220 new interpretation of maximumNumberOfCoefficients necessary for inverse transform 
 		autoMFCC thee = MFCC_create (my xmin, my xmax, my nx, my dx, my x1, my ny - 1, my ymin, my ymax);
 		BandFilterSpectrogram_into_CC (me, thee.peek(), numberOfCoefficients);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": MFCC not created.");
 	}
 }
 
-BarkSpectrogram BarkSpectrogram_create (double tmin, double tmax, long nt, double dt, double t1, double fmin, double fmax, long nf, double df, double f1) {
+autoBarkSpectrogram BarkSpectrogram_create (double tmin, double tmax, long nt, double dt, double t1, double fmin, double fmax, long nf, double df, double f1) {
 	try {
 		autoBarkSpectrogram me = Thing_new (BarkSpectrogram);
 		Matrix_init (me.peek(), tmin, tmax, nt, dt, t1, fmin, fmax, nf, df, f1);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"BarkSpectrogram not created.");
 	}
@@ -439,18 +439,17 @@ void BarkSpectrogram_drawSekeyHansonFilterFunctions (BarkSpectrogram me, Graphic
 
 Thing_implement (MelSpectrogram, BandFilterSpectrogram, 2);
 
-MelSpectrogram MelSpectrogram_create (double tmin, double tmax, long nt, double dt, double t1, double fmin, double fmax, long nf, double df, double f1) {
+autoMelSpectrogram MelSpectrogram_create (double tmin, double tmax, long nt, double dt, double t1, double fmin, double fmax, long nf, double df, double f1) {
 	try {
 		autoMelSpectrogram me = Thing_new (MelSpectrogram);
 		Matrix_init (me.peek(), tmin, tmax, nt, dt, t1, fmin, fmax, nf, df, f1);
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"MelSpectrogram not created.");
 	}
 }
 
-void BandFilterSpectrogram_drawTimeSlice (I, Graphics g, double t, double fmin,
-                               double fmax, double min, double max, const char32 *xlabel, int garnish) {
+void BandFilterSpectrogram_drawTimeSlice (I, Graphics g, double t, double fmin, double fmax, double min, double max, const char32 *xlabel, int garnish) {
 	iam (Matrix);
 	Matrix_drawSliceY (me, g, t, fmin, fmax, min, max);
 	if (garnish) {
@@ -542,7 +541,7 @@ void MelSpectrogram_drawTriangularFilterFunctions (MelSpectrogram me, Graphics g
 	}
 }
 
-Matrix BandFilterSpectrogram_to_Matrix (BandFilterSpectrogram me, int to_dB) {
+autoMatrix BandFilterSpectrogram_to_Matrix (BandFilterSpectrogram me, int to_dB) {
 	try {
 		int units = to_dB ? 1 : 0;
 		autoMatrix thee = Matrix_create (my xmin, my xmax, my nx, my dx, my x1, my ymin, my ymax, my ny, my dy, my y1);
@@ -551,34 +550,34 @@ Matrix BandFilterSpectrogram_to_Matrix (BandFilterSpectrogram me, int to_dB) {
 				thy z[i][j] = my v_getValueAtSample (j, i, units);
 			}
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not converted to Matrix.");
 	}
 }
 
-BarkSpectrogram Matrix_to_BarkSpectrogram (Matrix me) {
+autoBarkSpectrogram Matrix_to_BarkSpectrogram (Matrix me) {
 	try {
 		autoBarkSpectrogram thee = BarkSpectrogram_create (my xmin, my xmax, my nx, my dx, my x1,
 			my ymin, my ymax, my ny, my dy, my y1);
 		NUMmatrix_copyElements (my z, thy z, 1, my ny, 1, my nx);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not converted to BarkSpectrogram.");
 	}
 }
 
-MelSpectrogram Matrix_to_MelSpectrogram (Matrix me) {
+autoMelSpectrogram Matrix_to_MelSpectrogram (Matrix me) {
 	try {
 		autoMelSpectrogram thee = MelSpectrogram_create (my xmin, my xmax, my nx, my dx, my x1, my ymin, my ymax, my ny, my dy, my y1);
 		NUMmatrix_copyElements (my z, thy z, 1, my ny, 1, my nx);
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not converted to MelSpectrogram.");
 	}
 }
 
-Intensity BandFilterSpectrogram_to_Intensity (BandFilterSpectrogram me) {
+autoIntensity BandFilterSpectrogram_to_Intensity (BandFilterSpectrogram me) {
 	try {
 		autoIntensity thee = Intensity_create (my xmin, my xmax, my nx, my dx, my x1);
 		for (long j = 1; j <= my nx; j++) {
@@ -588,7 +587,7 @@ Intensity BandFilterSpectrogram_to_Intensity (BandFilterSpectrogram me) {
 			}
 			thy z[1][j] = BandFilterSpectrogram_DBFAC * log10 (p / BandFilterSpectrogram_DBREF);
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": Intensity not created.");
 	}
@@ -608,8 +607,7 @@ void BandFilterSpectrogram_equalizeIntensities (BandFilterSpectrogram me, double
 	}
 }
 
-void BandFilterSpectrogram_and_PCA_drawComponent (BandFilterSpectrogram me, PCA thee, Graphics g, long component, double dblevel,
-                                       double frequencyOffset, double scale, double tmin, double tmax, double fmin, double fmax) {
+void BandFilterSpectrogram_and_PCA_drawComponent (BandFilterSpectrogram me, PCA thee, Graphics g, long component, double dblevel, double frequencyOffset, double scale, double tmin, double tmax, double fmin, double fmax) {
 	if (component < 1 || component > thy numberOfEigenvalues) {
 		Melder_throw (U"Component too large.");
 	}
diff --git a/dwtools/Spectrogram_extensions.h b/dwtools/Spectrogram_extensions.h
index 20f4556..34adaa3 100644
--- a/dwtools/Spectrogram_extensions.h
+++ b/dwtools/Spectrogram_extensions.h
@@ -2,7 +2,7 @@
 #define _Spectrogram_extensions_h_
 /* Spectrogram_extensions.h
  *
- * Copyright (C) 2014 David Weenink
+ * Copyright (C) 2014, 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
@@ -93,14 +93,13 @@ double BandFilterSpectrogram_getFrequencyInHertz (BandFilterSpectrogram me, doub
 
 void BandFilterSpectrogram_equalizeIntensities (BandFilterSpectrogram me, double intensity_db);
 
-Matrix BandFilterSpectrogram_to_Matrix (BandFilterSpectrogram me, int to_dB);
+autoMatrix BandFilterSpectrogram_to_Matrix (BandFilterSpectrogram me, int to_dB);
 
-Intensity BandFilterSpectrogram_to_Intensity (BandFilterSpectrogram me);
+autoIntensity BandFilterSpectrogram_to_Intensity (BandFilterSpectrogram me);
 
 void BandFilterSpectrogram_drawFrequencyScale (BandFilterSpectrogram me, Graphics g, double xmin, double xmax, double ymin, double ymax, int garnish);
 
-void BandFilterSpectrogram_drawTimeSlice (I, Graphics g, double t, double fmin,
-                               double fmax, double min, double max, const char32 *xlabel, int garnish);
+void BandFilterSpectrogram_drawTimeSlice (I, Graphics g, double t, double fmin, double fmax, double min, double max, const char32 *xlabel, int garnish);
 
 void BarkSpectrogram_drawSekeyHansonFilterFunctions (BarkSpectrogram me, Graphics g, bool xIsHertz, int fromFilter, int toFilter, double zmin, double zmax, bool yscale_dB, double ymin, double ymax, int garnish);
 
@@ -108,10 +107,9 @@ void BandFilterSpectrogram_drawSpectrumAtNearestTimeSlice (BandFilterSpectrogram
 
 void BandFilterSpectrogram_paintImage (BandFilterSpectrogram me, Graphics g, double xmin, double xmax, double ymin, double ymax, double minimum, double maximum, int garnish);
 
-BarkSpectrogram BarkSpectrogram_create (double tmin, double tmax, long nt, double dt,
-	double t1, double fmin, double fmax, long nf, double df, double f1);
+autoBarkSpectrogram BarkSpectrogram_create (double tmin, double tmax, long nt, double dt, double t1, double fmin, double fmax, long nf, double df, double f1);
 
-BarkSpectrogram Matrix_to_BarkSpectrogram (Matrix me);
+autoBarkSpectrogram Matrix_to_BarkSpectrogram (Matrix me);
 
 /*
 Interpretation:
@@ -122,20 +120,20 @@ Interpretation:
     ny the number of filters.
  */
 
-MelSpectrogram MelSpectrogram_create (double tmin, double tmax, long nt, double dt,
-	double t1, double fmin, double fmax, long nf, double df, double f1);
+autoMelSpectrogram MelSpectrogram_create (double tmin, double tmax, long nt, double dt, double t1, double fmin, double fmax, long nf, double df, double f1);
 
-MelSpectrogram Matrix_to_MelSpectrogram (Matrix me);
+autoMelSpectrogram Matrix_to_MelSpectrogram (Matrix me);
 
 void MelSpectrogram_drawTriangularFilterFunctions (MelSpectrogram me, Graphics g, bool xIsHertz, int fromFilter, int toFilter, double zmin, double zmax, bool yscale_dB, double ymin, double ymax, int garnish);
 
-MFCC MelSpectrogram_to_MFCC (MelSpectrogram me, long numberOfCoefficients);
-MelSpectrogram MFCC_to_MelSpectrogram (MFCC me, long first, long last, bool c0);
+autoMFCC MelSpectrogram_to_MFCC (MelSpectrogram me, long numberOfCoefficients);
+
+autoMelSpectrogram MFCC_to_MelSpectrogram (MFCC me, long first, long last, bool c0);
 
 void BandFilterSpectrogram_and_PCA_drawComponent (BandFilterSpectrogram me, PCA thee, Graphics g, long component, double dblevel,
 	double frequencyOffset, double scale, double tmin, double tmax, double fmin, double fmax);
 
-Matrix Spectrogram_to_Matrix_dB (Spectrogram me, double reference, double scaleFactor, double floor_dB);
+autoMatrix Spectrogram_to_Matrix_dB (Spectrogram me, double reference, double scaleFactor, double floor_dB);
 // dbs = scaleFactor * log10 (value/reference);
 // if (dbs < floor_db) { dbs = floor_dB }
 
diff --git a/dwtools/Strings_extensions.cpp b/dwtools/Strings_extensions.cpp
index 5c45b5f..b7867b2 100644
--- a/dwtools/Strings_extensions.cpp
+++ b/dwtools/Strings_extensions.cpp
@@ -36,7 +36,7 @@
 #include "Strings_extensions.h"
 #include "NUM2.h"
 
-Strings Strings_createFixedLength (long numberOfStrings) {
+autoStrings Strings_createFixedLength (long numberOfStrings) {
 	try {
 		if (numberOfStrings <= 0) {
 			Melder_throw (U"The number of strings must be positive.");
@@ -44,13 +44,13 @@ Strings Strings_createFixedLength (long numberOfStrings) {
 		autoStrings me = Thing_new (Strings);
 		my strings = NUMvector<char32 *> (1, numberOfStrings);
 		my numberOfStrings = numberOfStrings;
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Strings not created.");
 	}
 }
 
-Strings Strings_createAsCharacters (const char32 *string) {
+autoStrings Strings_createAsCharacters (const char32 *string) {
 	try {
 		autoStrings me = Thing_new (Strings);
 		my numberOfStrings = str32len (string);
@@ -58,13 +58,13 @@ Strings Strings_createAsCharacters (const char32 *string) {
 		for (long i = 1; i <= my numberOfStrings; i++) {
 			my strings[i] = Melder_dup (Melder_character (*string++));
 		}
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Strings from characters not created.");
 	}
 }
 
-Strings Strings_createAsTokens (const char32 *string) {
+autoStrings Strings_createAsTokens (const char32 *string) {
 	try {
 		autoStrings me = Thing_new (Strings);
 		my numberOfStrings =  Melder_countTokens (string);
@@ -73,7 +73,7 @@ Strings Strings_createAsTokens (const char32 *string) {
 		for (char32 *token = Melder_firstToken (string); token != 0; token = Melder_nextToken ()) {
 			my strings[i++] = Melder_dup (token);
 		}
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Strings from characters not created.");
 	}
@@ -88,7 +88,7 @@ long Strings_findString (Strings me, const char32 *string) {
 	return 0;
 }
 
-Strings Strings_append (Collection me) {
+autoStrings Strings_append (Collection me) {
 	try {
 		long index = 1, numberOfStrings = 0;
 
@@ -108,39 +108,38 @@ Strings Strings_append (Collection me) {
 				thy strings [index] = Melder_dup (s -> strings[j]);
 			}
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not appended.");
 	}
 }
 
-Strings Strings_change (Strings me, const char32 *search, const char32 *replace, int maximumNumberOfReplaces,
-                        long *nmatches, long *nstringmatches, int use_regexp) {
+autoStrings Strings_change (Strings me, const char32 *search, const char32 *replace, int maximumNumberOfReplaces, long *nmatches, long *nstringmatches, int use_regexp) {
 	try {
 		autoStrings thee = Thing_new (Strings);
 		char32 **strings = strs_replace (my strings, 1, my numberOfStrings, search, replace, maximumNumberOfReplaces,
 		                                  nmatches, nstringmatches, use_regexp);
 		thy numberOfStrings = my numberOfStrings;
 		thy strings = strings;
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": not changed.");
 	}
 }
 
-Strings strings_to_Strings (char32 **strings, long from, long to) {
+autoStrings strings_to_Strings (char32 **strings, long from, long to) {
 	try {
 		autoStrings thee = Strings_createFixedLength (to - from + 1);
 		for (long i = from; i <= to; i++) {
 			thy strings[i - from + 1]  = Melder_dup (strings[i]);
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (U"Strings not created.");
 	}
 }
 
-Strings Strings_extractPart (Strings me, long from, long to) {
+autoStrings Strings_extractPart (Strings me, long from, long to) {
 	try {
 		if (from < 1 || to > my numberOfStrings || from > to) Melder_throw
 			(U"Strings_extractPart: begin and end must be in interval [1, ", my numberOfStrings, U"].");
@@ -150,13 +149,13 @@ Strings Strings_extractPart (Strings me, long from, long to) {
 	}
 }
 
-Strings strings_to_Strings_link (char32 **strings, long n) {
+autoStrings strings_to_Strings_link (char32 **strings, long n) {
 	try {
 		autoStrings me = Strings_createFixedLength (n);
 		for (long i = 1; i <= n; i++) {
 			my strings[i] = strings[i];
 		}
-		return me.transfer();
+		return me;
 	} catch (MelderError) {
 		Melder_throw (U"Strings not linked.");
 	}
@@ -164,23 +163,23 @@ Strings strings_to_Strings_link (char32 **strings, long n) {
 
 void Strings_unlink (Strings me) {
 	for (long i = 1; i <= my numberOfStrings; i++) {
-		my strings[i] = 0;
+		my strings[i] = nullptr;
 	}
 }
 
-Permutation Strings_to_Permutation (Strings me, int sort) {
+autoPermutation Strings_to_Permutation (Strings me, int sort) {
 	try {
 		autoPermutation thee = Permutation_create (my numberOfStrings);
 		if (sort != 0) {
 			NUMindexx_s (my strings, my numberOfStrings, thy p);
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": no Permutation created.");
 	}
 }
 
-Strings Strings_and_Permutation_permuteStrings (Strings me, Permutation thee) {
+autoStrings Strings_and_Permutation_permuteStrings (Strings me, Permutation thee) {
 	try {
 		if (my numberOfStrings != thy numberOfElements) Melder_throw (U"Strings_and_Permutation_permuteStrings: "
 			        U"The number of strings and the number of elements in the Permutation must be equal.");
@@ -189,13 +188,13 @@ Strings Strings_and_Permutation_permuteStrings (Strings me, Permutation thee) {
 			long index = thy p[i];
 			his strings[i] = Melder_dup (my strings[index]);
 		}
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (me, U": no permuted Strings created.");
 	}
 }
 
-StringsIndex Stringses_to_StringsIndex (Strings me, Strings classes) {
+autoStringsIndex Stringses_to_StringsIndex (Strings me, Strings classes) {
 	try {
 		autoStringsIndex tmp = Strings_to_StringsIndex (classes);
 		long numberOfClasses = tmp -> classes -> size;
@@ -218,13 +217,13 @@ StringsIndex Stringses_to_StringsIndex (Strings me, Strings classes) {
 			}
 			his classIndex[j] = index;
 		}
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (me, U": no StringsIndex created.");
 	}
 }
 
-StringsIndex Strings_to_StringsIndex (Strings me) {
+autoStringsIndex Strings_to_StringsIndex (Strings me) {
 	try {
 		autoStringsIndex thee = StringsIndex_create (my numberOfStrings);
 		autoPermutation sorted = Strings_to_Permutation (me, 1);
@@ -241,26 +240,26 @@ StringsIndex Strings_to_StringsIndex (Strings me) {
 			}
 			thy classIndex[index] = numberOfClasses;
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": no StringsIndex created.");
 	}
 }
 
-Strings StringsIndex_to_Strings (StringsIndex me) {
+autoStrings StringsIndex_to_Strings (StringsIndex me) {
 	try {
 		autoStrings thee = Strings_createFixedLength (my numberOfElements);
 		for (long i = 1; i <= thy numberOfStrings; i++) {
 			SimpleString s = (SimpleString) my classes -> item[my classIndex[i]];
 			thy strings[i] = Melder_dup (s -> string);
 		}
-		return thee.transfer();
+		return thee;
 	} catch (MelderError) {
 		Melder_throw (me, U": no Strings created.");
 	}
 }
 
-StringsIndex Table_to_StringsIndex_column (Table me, long column) {
+autoStringsIndex Table_to_StringsIndex_column (Table me, long column) {
 	try {
 		if (column < 1 || column > my numberOfColumns) {
 			Melder_throw (U"Invalid column number.");
@@ -273,7 +272,7 @@ StringsIndex Table_to_StringsIndex_column (Table me, long column) {
 		}
 		autoStrings thee = strings_to_Strings (groupLabels.peek(), 1, numberOfRows);
 		autoStringsIndex him = Strings_to_StringsIndex (thee.peek());
-		return him.transfer();
+		return him;
 	} catch (MelderError) {
 		Melder_throw (me, U"No StringsIndex created from column ", column, U".");
 	}
diff --git a/dwtools/Strings_extensions.h b/dwtools/Strings_extensions.h
index 9447a37..902a890 100644
--- a/dwtools/Strings_extensions.h
+++ b/dwtools/Strings_extensions.h
@@ -2,7 +2,7 @@
 #define _Strings_extensions_h_
 /* Strings_extensions.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
@@ -35,38 +35,42 @@
 #include "Table.h"
 
 
-Strings Strings_createFixedLength (long numberOfStrings);
-Strings Strings_createAsCharacters (const char32 *string);
-Strings Strings_createAsTokens (const char32 *string);
+autoStrings Strings_createFixedLength (long numberOfStrings);
+
+autoStrings Strings_createAsCharacters (const char32 *string);
+
+autoStrings Strings_createAsTokens (const char32 *string);
 
 long Strings_findString (Strings me, const char32 *string);
-Strings Strings_append (Collection me);
 
-Strings Strings_change (Strings me, const char32 *search, const char32 *replace,
-	int maximumNumberOfReplaces, long *nmatches, long *nstringmatches,
-	int use_regexp);
+autoStrings Strings_append (Collection me);
+
+autoStrings Strings_change (Strings me, const char32 *search, const char32 *replace,
+	int maximumNumberOfReplaces, long *nmatches, long *nstringmatches, int use_regexp);
 
-Strings strings_to_Strings (char32 **strings, long from, long to);
+autoStrings strings_to_Strings (char32 **strings, long from, long to);
 
 // If the Strings is only an intermediate object to achieve other goals, use the following two routines to avoid copying.
-Strings strings_to_Strings_link (char32** strings, long n);
+autoStrings strings_to_Strings_link (char32** strings, long n);
 // for (i=1; i<= n; i++) my strings[i] = strings[i];
+
 void Strings_unlink (Strings me);
 // for (i=1; i<= my numberOfStrings; i++) my strings[i] = NULL;
 
-Strings Strings_extractPart (Strings me, long start, long end);
+autoStrings Strings_extractPart (Strings me, long start, long end);
+
 
+autoStringsIndex Strings_to_StringsIndex (Strings me);
 
-StringsIndex Strings_to_StringsIndex (Strings me);
-StringsIndex Stringses_to_StringsIndex (Strings me, Strings classes);
+autoStringsIndex Stringses_to_StringsIndex (Strings me, Strings classes);
 /* Construct the index with strings in classes, index[i]=0 when my strings[i] doesn't occur in classes */
 
-StringsIndex Table_to_StringsIndex_column (Table me, long column);
+autoStringsIndex Table_to_StringsIndex_column (Table me, long column);
 
-Strings StringsIndex_to_Strings (StringsIndex me);
+autoStrings StringsIndex_to_Strings (StringsIndex me);
 
-Permutation Strings_to_Permutation (Strings me, int sort);
+autoPermutation Strings_to_Permutation (Strings me, int sort);
 
-Strings Strings_and_Permutation_permuteStrings (Strings me, Permutation thee);
+autoStrings Strings_and_Permutation_permuteStrings (Strings me, Permutation thee);
 
 #endif /* _Strings_extensions_h_ */
diff --git a/dwtools/praat_BSS_init.cpp b/dwtools/praat_BSS_init.cpp
index 97670c2..a616d64 100644
--- a/dwtools/praat_BSS_init.cpp
+++ b/dwtools/praat_BSS_init.cpp
@@ -52,7 +52,7 @@ DO
 	LOOP {
 		iam (EEG);
 		autoCrossCorrelationTable cct = EEG_to_CrossCorrelationTable (me, startTime, endTime, lagTime, channelRanges);
-		praat_new (cct.transfer(), my name, U"_", (long) floor (lagTime*1000)); // lagTime to ms   ppgb: geeft afrondingsfouten; waarom niet round?
+		praat_new (cct.move(), my name, U"_", (long) floor (lagTime*1000)); // lagTime to ms   ppgb: geeft afrondingsfouten; waarom niet round?
 	}
 END
 
@@ -68,7 +68,7 @@ DO
 	LOOP {
 		iam (EEG);
 		autoCovariance cov = EEG_to_Covariance (me, startTime, endTime, channelRanges);
-		praat_new (cov.transfer(), my name);
+		praat_new (cov.move(), my name);
 	}
 END
 
@@ -85,7 +85,7 @@ DO
 		iam (EEG);
 		autoCrossCorrelationTables thee = EEG_to_CrossCorrelationTables (me, GET_REAL (U"left Time range"), GET_REAL (U"right Time range"),
 			GET_REAL (U"Lag step"), GET_INTEGER (U"Number of cross-correlations"), GET_STRING (U"Channel ranges"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -116,7 +116,7 @@ DO
 			GET_INTEGER (U"Number of cross-correlations"), GET_REAL (U"Lag step"), GET_STRING (U"Channel ranges"),
 			whiteningMethod, GET_INTEGER (U"Diagonalization method"),
 			GET_INTEGER (U"Maximum number of iterations"), GET_REAL (U"Tolerance"));
-		praat_new (thee.transfer(), my name, U"_bss");
+		praat_new (thee.move(), my name, U"_bss");
 	}
 END
 
@@ -136,7 +136,7 @@ DO
 	LOOP {
 		iam (EEG);
 		autoPCA pca = EEG_to_PCA (me, startTime, endTime, channelRanges, useCorrelation);
-		praat_new (pca.transfer(), my name);
+		praat_new (pca.move(), my name);
 	}
 END
 
@@ -147,7 +147,7 @@ DO
 	EEG me = FIRST (EEG);
 	PCA thee = FIRST (PCA);
 	autoEEG him = EEG_and_PCA_to_EEG_principalComponents (me, thee, GET_INTEGER (U"Number of components"));
-	praat_new (him.transfer(), my name, U"_pc");
+	praat_new (him.move(), my name, U"_pc");
 END
 
 FORM (EEG_and_PCA_to_EEG_whiten, U"EEG & PCA: To EEG (whiten)", U"EEG & PCA: To EEG (whiten)...")
@@ -157,7 +157,7 @@ DO
 	EEG me = FIRST (EEG);
 	PCA thee = FIRST (PCA);
 	autoEEG him = EEG_and_PCA_to_EEG_whiten (me, thee, GET_INTEGER (U"Number of components"));
-	praat_new (him.transfer(), my name, U"_white");
+	praat_new (him.move(), my name, U"_white");
 END
 
 FORM (EEG_to_Sound_modulated, U"EEG: To Sound (modulated)", 0)
@@ -171,7 +171,7 @@ DO
 		iam (EEG);
 		autoSound thee = EEG_to_Sound_modulated (me, GET_REAL (U"Start frequency"), GET_REAL (U"Channel bandwidth"),
 			GET_STRING (U"Channel ranges"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -187,7 +187,7 @@ DO
 		iam (EEG);
 		autoSound thee = EEG_to_Sound_frequencyShifted (me, channel, GET_REAL (U"Frequency shift"),
 			GET_REAL (U"Sampling frequecy"), GET_REAL (U"Maximum amplitude"));
-		praat_new (thee.transfer(), my name, U"_ch", channel);
+		praat_new (thee.move(), my name, U"_ch", channel);
 	}
 END
 
@@ -203,7 +203,7 @@ FORM (CrossCorrelationTables_createTestSet, U"CrossCorrelationTables: Create tes
 DO
 	autoCrossCorrelationTables thee = CrossCorrelationTables_createTestSet (GET_INTEGER (U"Matrix dimension"),
 		GET_INTEGER (U"Number of matrices"), GET_INTEGER (U"First is positive definite"), GET_REAL (U"Sigma"));
-	praat_new (thee.transfer(), GET_STRING (U"Name"));
+	praat_new (thee.move(), GET_STRING (U"Name"));
 END
 
 FORM (CrossCorrelationTable_createSimple, U"Create simple CrossCorrelationTable", 0)
@@ -215,7 +215,7 @@ FORM (CrossCorrelationTable_createSimple, U"Create simple CrossCorrelationTable"
 DO
 	autoCrossCorrelationTable thee = CrossCorrelationTable_createSimple (GET_STRING (U"Cross correlations"), GET_STRING (U"Centroid"),
 		GET_INTEGER (U"Number of samples"));
-	praat_new (thee.transfer(), GET_STRING (U"Name"));
+	praat_new (thee.move(), GET_STRING (U"Name"));
 END
 
 FORM (MixingMatrix_createSimple, U"Create simple MixingMatrix", 0)
@@ -227,7 +227,7 @@ FORM (MixingMatrix_createSimple, U"Create simple MixingMatrix", 0)
 DO
 	autoMixingMatrix thee = MixingMatrix_createSimple (GET_INTEGER (U"Number of channels"), GET_INTEGER (U"Number of components"),
 		GET_STRING (U"Mixing coefficients"));
-	praat_new (thee.transfer(), GET_STRING (U"Name"));
+	praat_new (thee.move(), GET_STRING (U"Name"));
 END
 
 DIRECT (CrossCorrelationTable_help)
@@ -241,7 +241,7 @@ DO
 	Sound me = FIRST (Sound);
 	PCA thee = FIRST (PCA);
 	autoSound him = Sound_and_PCA_principalComponents (me, thee, GET_INTEGER (U"Number of components"));
-	praat_new (him.transfer(), my name, U"_pc");
+	praat_new (him.move(), my name, U"_pc");
 END
 
 FORM (Sound_and_PCA_whitenChannels, U"Sound & PCA: To Sound (white channels)", 0)
@@ -251,7 +251,7 @@ DO
 	Sound me = FIRST (Sound);
 	PCA thee = FIRST (PCA);
 	autoSound him = Sound_and_PCA_whitenChannels (me, thee, GET_INTEGER (U"Number of components"));
-	praat_new (him.transfer(), my name, U"_white");
+	praat_new (him.move(), my name, U"_white");
 END
 
 DIRECT (CrossCorrelationTable_to_CrossCorrelationTables)
@@ -269,7 +269,7 @@ DIRECT (CrossCorrelationTable_to_CrossCorrelationTables)
 		autoCrossCorrelationTable myc = Data_copy (me);
 		Collection_addItem (thee.peek(), myc.transfer());
 	}
-	praat_new (thee.transfer(), U"ct_", nselected);
+	praat_new (thee.move(), U"ct_", nselected);
 END
 
 FORM (Sound_to_Covariance_channels, U"Sound: To Covariance (channels)", U"Sound: To Covariance (channels)...")
@@ -280,7 +280,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoCovariance thee = Sound_to_Covariance_channels (me, GET_REAL (U"left Time range"), GET_REAL (U"right Time range"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -295,7 +295,7 @@ DO
         iam (Sound);
 		autoCrossCorrelationTable thee = Sound_to_CrossCorrelationTable (me, GET_REAL (U"left Time range"),
         GET_REAL (U"right Time range"), lagTime);
-        praat_new (thee.transfer(), my name);
+        praat_new (thee.move(), my name);
     }
 END
 
@@ -313,7 +313,7 @@ DO
 	Melder_assert (s1 && s2);
 	autoCrossCorrelationTable thee = Sounds_to_CrossCorrelationTable_combined (s1, s2, GET_REAL (U"left Time range"),
 		GET_REAL (U"right Time range"), GET_REAL (U"Lag step"));
-	praat_new (thee.transfer(), s1 -> name, U"_", s2 -> name, U"_cc");
+	praat_new (thee.move(), s1 -> name, U"_", s2 -> name, U"_cc");
 END
 
 DIRECT (CrossCorrelationTables_help)
@@ -344,7 +344,7 @@ DO
 			Melder_throw (U"Index too large.");
 		}
 		autoCrossCorrelationTable thee = Data_copy ( (CrossCorrelationTable) my item[index]);
-		praat_new (thee.transfer(), Thing_getName (me), U"_", index);
+		praat_new (thee.move(), Thing_getName (me), U"_", index);
 	}
 END
 
@@ -360,7 +360,7 @@ DO
 		iam (CrossCorrelationTables);
 		autoDiagonalizer thee = CrossCorrelationTables_to_Diagonalizer (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);
 	}
 END
 
@@ -394,14 +394,14 @@ DIRECT (CrossCorrelationTable_and_Diagonalizer_diagonalize)
 	CrossCorrelationTable cct = FIRST (CrossCorrelationTable);
 	Diagonalizer d = FIRST (Diagonalizer);
 	autoCrossCorrelationTable thee = CrossCorrelationTable_and_Diagonalizer_diagonalize (cct, d);
-	praat_new (thee.transfer(), cct -> name, U"_", d -> name);
+	praat_new (thee.move(), cct -> name, U"_", d -> name);
 END
 
 DIRECT (CrossCorrelationTables_and_Diagonalizer_diagonalize)
 	CrossCorrelationTables ccts = FIRST (CrossCorrelationTables);
 	Diagonalizer d = FIRST (Diagonalizer);
 	autoCrossCorrelationTables thee = CrossCorrelationTables_and_Diagonalizer_diagonalize (ccts, d);
-	praat_new (thee.transfer(), ccts->name, U"_", d->name);
+	praat_new (thee.move(), ccts->name, U"_", d->name);
 END
 
 FORM (CrossCorrelationTables_and_MixingMatrix_improveUnmixing, U"", 0)
@@ -423,7 +423,7 @@ DIRECT (Diagonalizer_to_MixingMatrix)
 	LOOP {
 		iam (Diagonalizer);
 		autoMixingMatrix thee = Diagonalizer_to_MixingMatrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -445,7 +445,7 @@ DO
 		autoMixingMatrix thee = Sound_to_MixingMatrix (me, GET_REAL (U"left Time range"), GET_REAL (U"right Time range"), 
 			GET_INTEGER (U"Number of cross-correlations"), GET_REAL (U"Lag step"), 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);
 	}
 END
 
@@ -459,7 +459,7 @@ DO
 	LOOP {
 		iam (Sound);
 		autoCrossCorrelationTables thee = Sound_to_CrossCorrelationTables (me, GET_REAL (U"left Time range"), GET_REAL (U"right Time range"), GET_REAL (U"Lag step"), GET_INTEGER (U"Number of cross-correlations"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -478,10 +478,11 @@ FORM (Sound_to_Sound_bss, U"Sound: To Sound (blind source separation)", U"Sound:
 DO
 	LOOP {
 		iam (Sound);
-		praat_new (Sound_to_Sound_BSS (me, GET_REAL (U"left Time range"), GET_REAL (U"right Time range"),
+		autoSound thee = Sound_to_Sound_BSS (me, GET_REAL (U"left Time range"), GET_REAL (U"right Time range"),
 			GET_INTEGER (U"Number of cross-correlations"), GET_REAL (U"Lag step"),
 			GET_INTEGER (U"Maximum number of iterations"), GET_REAL (U"Tolerance"),
-			GET_INTEGER (U"Diagonalization method")), my name, U"_bss");
+			GET_INTEGER (U"Diagonalization method"));
+		praat_new (thee.move(), my name, U"_bss");
 	}
 END
 
@@ -494,27 +495,30 @@ DO
     long permille = (long) floor (varianceFraction * 1000.0);
     LOOP {
         iam (Sound);
-        praat_new (Sound_whitenChannels (me, varianceFraction), my name, U"_", permille);
+		autoSound thee = Sound_whitenChannels (me, varianceFraction);
+        praat_new (thee.move(), my name, U"_", permille);
     }
 END
 
 DIRECT (Sound_and_MixingMatrix_mix)
 	Sound s = FIRST (Sound);
 	MixingMatrix mm = FIRST (MixingMatrix);
-	praat_new (Sound_and_MixingMatrix_mix (s, mm), Thing_getName (s), U"_mixed");
+	autoSound thee = Sound_and_MixingMatrix_mix (s, mm);
+	praat_new (thee.move(), Thing_getName (s), U"_mixed");
 END
 
 DIRECT (Sound_and_MixingMatrix_unmix)
 	Sound s = FIRST (Sound);
 	MixingMatrix mm = FIRST (MixingMatrix);
-	praat_new (Sound_and_MixingMatrix_unmix (s, mm), Thing_getName (s), U"_unmixed");
+	autoSound thee = Sound_and_MixingMatrix_unmix (s, mm);
+	praat_new (thee.move(), Thing_getName (s), U"_unmixed");
 END
 
 DIRECT (TableOfReal_to_MixingMatrix)
 	LOOP {
 		iam (TableOfReal);
 		autoMixingMatrix thee = TableOfReal_to_MixingMatrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -533,9 +537,9 @@ DO
 	}
 	Melder_assert (t1 && t2);
 	int by_columns = GET_INTEGER (U"Correlations between") - 1;
-	praat_new (TableOfReal_and_TableOfReal_crossCorrelations (t1, t2, by_columns,
-		GET_INTEGER (U"Center"), GET_INTEGER (U"Normalize")),
-		(by_columns ? U"by_columns" : U"by_rows"));
+	autoTableOfReal thee = TableOfReal_and_TableOfReal_crossCorrelations (t1, t2, by_columns,
+		GET_INTEGER (U"Center"), GET_INTEGER (U"Normalize"));
+	praat_new (thee.move(), ( by_columns ? U"by_columns" : U"by_rows" ));
 END
 
 void praat_TableOfReal_init3 (ClassInfo klas) {
diff --git a/dwtools/praat_DataModeler_init.cpp b/dwtools/praat_DataModeler_init.cpp
index 997d51b..e0b3b30 100644
--- a/dwtools/praat_DataModeler_init.cpp
+++ b/dwtools/praat_DataModeler_init.cpp
@@ -46,7 +46,7 @@ DO
 	autoDataModeler thee = DataModeler_createSimple (GET_REAL (U"left X range"), GET_REAL (U"right X range"),
 		GET_INTEGER (U"Number of data points"), GET_STRING (U"Parameters"), GET_REAL (U"Gaussian noise stdev"),
 		GET_INTEGER (U"Basis functions") - 1);
-	praat_new (thee.transfer(), GET_STRING (U"Name"));
+	praat_new (thee.move(), GET_STRING (U"Name"));
 END
 
 FORM (DataModeler_speckle, U"DataModeler: Speckle", 0)
@@ -382,7 +382,7 @@ DIRECT (DataModeler_to_Covariance_parameters)
 	LOOP {
 		iam (DataModeler);
 		autoCovariance thee = DataModeler_to_Covariance_parameters (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -393,7 +393,7 @@ DO
 	LOOP {
 		iam (DataModeler);
 		autoTable thee = DataModeler_to_Table_zscores (me, GET_INTEGER (U"Use sigmas on y-values"));
-		praat_new (thee.transfer(), my name, U"_z");
+		praat_new (thee.move(), my name, U"_z");
 	}
 END
 
@@ -416,7 +416,7 @@ DO
 		iam (Formant);
 		autoFormantModeler thee = Formant_to_FormantModeler (me, GET_REAL (U"left Start time"), 
 			GET_REAL (U"right End time"), GET_INTEGER (U"Number of formants"), order + 1, GET_INTEGER (U"Weigh data") - 1);
-		praat_new (thee.transfer(), my name, U"_o", order);
+		praat_new (thee.move(), my name, U"_o", order);
 	}
 END
 
@@ -451,7 +451,7 @@ DO
 	}
 	Melder_assert (him);
 	autoFormant thee = Formant_extractPart (him, tmin, tmax);
-	praat_new (thee.transfer(), his name, U"_part");
+	praat_new (thee.move(), his name, U"_part");
 END
 
 
@@ -493,7 +493,7 @@ DO
 	}
 	Melder_assert (him);
 	autoFormant thee = Formant_extractPart (him, tmin, tmax);
-	praat_new (thee.transfer(), his name, U"_part");
+	praat_new (thee.move(), his name, U"_part");
 END
 
 /********************** FormantModeler ******************************/
@@ -1098,7 +1098,7 @@ DO
 	LOOP {
 		iam (FormantModeler);
 		autoCovariance thee = FormantModeler_to_Covariance_parameters (me, iformant);
-		praat_new (thee.transfer(), my name, U"_", iformant);
+		praat_new (thee.move(), my name, U"_", iformant);
 	}
 END
 
@@ -1110,7 +1110,7 @@ DO
 	LOOP {
 		iam (FormantModeler);
 		autoDataModeler thee = FormantModeler_extractDataModeler (me, iformant);
-		praat_new (thee.transfer(), my name, U"_", iformant);
+		praat_new (thee.move(), my name, U"_", iformant);
 	}
 END
 
@@ -1121,7 +1121,7 @@ DO
 	LOOP {
 		iam (FormantModeler);
 		autoTable thee = FormantModeler_to_Table_zscores (me, GET_INTEGER (U"Bandwidths as standard deviation"));
-		praat_new (thee.transfer(), my name, U"_z");
+		praat_new (thee.move(), my name, U"_z");
 	}
 END
 
@@ -1133,7 +1133,7 @@ DO
 	LOOP {
 		iam (FormantModeler);
 		autoFormantModeler thee = FormantModeler_processOutliers (me, GET_REAL (U"Number of sigmas"), GET_INTEGER (U"Bandwidths as standard deviation"));
-		praat_new (thee.transfer(), my name, U"_outliers");
+		praat_new (thee.move(), my name, U"_outliers");
 	}
 END
 
@@ -1166,7 +1166,7 @@ DO
 		iam (Pitch);
 		autoPitchModeler thee = Pitch_to_PitchModeler (me, GET_REAL (U"left Start time"), GET_REAL (U"right End time"), 
 			GET_INTEGER (U"Order of polynomials") + 1);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -1252,7 +1252,7 @@ DO
 			GET_INTEGER (U"Number of formant tracks in model"), GET_INTEGER (U"Order of polynomials") + 1,
 			GET_INTEGER (U"Weigh data") - 1, GET_REAL (U"Number of sigmas"), GET_REAL (U"Parameter variance power"),
 			0, 1, 1, 1, 1, 1, &ceiling);
-		praat_new (formant.transfer(), my name, U"_", Melder_fixed (ceiling, 0));
+		praat_new (formant.move(), my name, U"_", Melder_fixed (ceiling, 0));
 	}
 END
 
@@ -1294,7 +1294,7 @@ DO
 			GET_REAL (U"Parameter variance power"), 1,
 			GET_REAL (U"Minimum F1"), GET_REAL (U"Maximum F1"), GET_REAL (U"Minimum F2"), 
 			GET_REAL (U"Maximum F2"), GET_REAL (U"Minimum F3"), &ceiling);
-		praat_new (formant.transfer(), my name, U"_", Melder_fixed (ceiling, 0));
+		praat_new (formant.move(), my name, U"_", Melder_fixed (ceiling, 0));
 	}
 END
 
@@ -1336,7 +1336,7 @@ DO
 			GET_REAL (U"Parameter variance power"), 1,
 			GET_REAL (U"Minimum F1"), GET_REAL (U"Maximum F1"), GET_REAL (U"Minimum F2"), 
 			GET_REAL (U"Maximum F2"), GET_REAL (U"Minimum F3"), &ceiling);
-		praat_new (formant.transfer(), my name, U"_", Melder_fixed (ceiling, 0));
+		praat_new (formant.move(), my name, U"_", Melder_fixed (ceiling, 0));
 	}
 END
 
@@ -1366,7 +1366,7 @@ DO
 			GET_REAL (U"left Maximum frequency range"), GET_REAL (U"right Maximum frequency range"), GET_INTEGER (U"Number of frequency steps"),
 			GET_REAL (U"Pre-emphasis from"), GET_REAL (U"Formant smoothing window"), GET_INTEGER (U"Number of formant tracks in model"),
 			GET_INTEGER (U"Order of polynomials") + 1, GET_INTEGER (U"Weigh data") - 1, GET_REAL (U"Number of sigmas"), GET_REAL (U"Parameter variance power"));
-		praat_new (octier.transfer(), my name);
+		praat_new (octier.move(), my name);
 	}
 END
 
@@ -1388,7 +1388,7 @@ DO
 		long scolumn = Table_findColumnIndexFromColumnLabel (me, GET_STRING (U"Column with sigmas"));
 		autoDataModeler thee = Table_to_DataModeler (me, GET_REAL (U"left X range"), GET_REAL (U"right X range"),
 			xcolumn, ycolumn, scolumn, GET_INTEGER (U"Maximum order") + 1, GET_INTEGER (U"Model functions"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
diff --git a/dwtools/praat_David_init.cpp b/dwtools/praat_David_init.cpp
index d33c17e..1ad6686 100644
--- a/dwtools/praat_David_init.cpp
+++ b/dwtools/praat_David_init.cpp
@@ -170,7 +170,7 @@ DIRECT (Activation_to_Matrix)
 	LOOP {
 		iam (Activation);
 		autoMatrix thee = Activation_to_Matrix (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -346,7 +346,7 @@ DIRECT (Categories_getNumberOfCategories)
 END
 
 DIRECT (Categories_getNumberOfDifferences)
-	Categories c1 = 0, c2 = 0;
+	Categories c1 = nullptr, c2 = nullptr;
 	LOOP {
 		iam (Categories);
 		(c1 ? c2 : c1) = me;
@@ -362,7 +362,7 @@ DIRECT (Categories_getNumberOfDifferences)
 END
 
 DIRECT (Categories_getFractionDifferent)
-	Categories c1 = 0, c2 = 0;
+	Categories c1 = nullptr, c2 = nullptr;
 	LOOP {
 		iam (Categories);
 		(c1 ? c2 : c1) = me;
@@ -372,13 +372,14 @@ DIRECT (Categories_getFractionDifferent)
 END
 
 DIRECT (Categories_difference)
-	Categories c1 = 0, c2 = 0;
+	Categories c1 = nullptr, c2 = nullptr;
 	LOOP {
 		iam (Categories);
 		(c1 ? c2 : c1) = me;
 	}
 	Melder_assert (c1 && c2);
-	double fraction; long n;
+	long n;
+	double fraction;
 	OrderedOfString_difference (c1, c2, &n, &fraction);
 	Melder_information (n, U" differences");
 END
@@ -387,42 +388,45 @@ DIRECT (Categories_selectUniqueItems)
 	LOOP {
 		iam (Categories);
 		autoCategories thee = Categories_selectUniqueItems (me, 1);
-		praat_new (thee.transfer(), my name, U"_uniq");
+		praat_new (thee.move(), my name, U"_uniq");
 	}
 END
 
 DIRECT (Categories_to_Confusion)
-	Categories c1 = 0, c2 = 0;
+	Categories c1 = nullptr, c2 = nullptr;
 	LOOP {
 		iam (Categories);
 		(c1 ? c2 : c1) = me;
 	}
 	Melder_assert (c1 && c2);
 	autoConfusion thee = Categories_to_Confusion (c1, c2);
-	praat_new (thee.transfer(), Thing_getName (c1), U"_", Thing_getName (c2));
+	praat_new (thee.move(), Thing_getName (c1), U"_", Thing_getName (c2));
 END
 
 DIRECT (Categories_to_Strings)
 	LOOP {
 		iam (Categories);
-		praat_new (Categories_to_Strings (me), my name);
+		autoStrings thee = Categories_to_Strings (me);
+		praat_new (thee.move(), my name);
 	}
 END
 
 DIRECT (Categories_join)
-	Categories c1 = 0, c2 = 0;
+	Categories c1 = nullptr, c2 = nullptr;
 	LOOP {
 		iam (Categories);
 		(c1 ? c2 : c1) = me;
 	}
 	Melder_assert (c1 && c2);
-	praat_new (OrderedOfString_joinItems (c1, c2), 0);
+	autoOrderedOfString thee = OrderedOfString_joinItems (c1, c2);
+	praat_new (thee.move());
 END
 
 DIRECT (Categories_permuteItems)
 	LOOP {
 		iam (Collection);
-		praat_new (Collection_permuteItems (me), my name, U"_perm");
+		autoCollection thee = Collection_permuteItems (me);   // thee will be of class Categories!
+		praat_new (thee.move(), my name, U"_perm");
 	}
 END
 
@@ -516,7 +520,7 @@ FORM (CCs_to_DTW, U"CC: To DTW", U"CC: To DTW...")
 	DTW_constraints_addCommonFields (dia);
 	OK
 DO
-	CC c1 = 0, c2 = 0;
+	CC c1 = nullptr, c2 = nullptr;
 	LOOP {
 		iam (CC);
 		(c1 ? c2 : c1) = me;
@@ -527,14 +531,15 @@ DO
     autoDTW thee = CCs_to_DTW (c1, c2, GET_REAL (U"Cepstral weight"), GET_REAL (U"Log energy weight"),
         GET_REAL (U"Regression weight"), GET_REAL (U"Regression weight log energy"),
         GET_REAL (U"Regression coefficients window"));
-    DTW_findPath (thee.peek(), begin, end, slope);
-	praat_new (thee.transfer(), U"");
+    DTW_findPath (thee.get(), begin, end, slope);
+	praat_new (thee.move(), U"");
 END
 
 DIRECT (CC_to_Matrix)
 	LOOP {
 		iam (CC);
-		praat_new (CC_to_Matrix (me), my name);
+		autoMatrix thee = CC_to_Matrix (me);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -597,7 +602,7 @@ DO
 	LOOP {
 		iam (CCA);
 		Melder_information (CCA_getEigenvectorElement (me, GET_INTEGER (U"X or Y"),
-		GET_INTEGER (U"Eigenvector number"), GET_INTEGER (U"Element number")));
+			GET_INTEGER (U"Eigenvector number"), GET_INTEGER (U"Element number")));
 	}
 END
 
@@ -610,14 +615,15 @@ DO
 		double p, chisq; long ndf;
 		CCA_getZeroCorrelationProbability (me, GET_INTEGER (U"Coefficient number"), &chisq, &ndf, &p);
 		Melder_information (p, U" (=probability for chisq = ", chisq,
-		U" and ndf = ", ndf, U")");
+			U" and ndf = ", ndf, U")");
 	}
 END
 
 DIRECT (CCA_and_Correlation_factorLoadings)
-	CCA cca = FIRST (CCA);
-	Correlation c = FIRST (Correlation);
-	praat_new (CCA_and_Correlation_factorLoadings (cca, c), Thing_getName (cca), U"_loadings");
+	CCA me = FIRST (CCA);
+	Correlation thee = FIRST (Correlation);
+	autoTableOfReal result = CCA_and_Correlation_factorLoadings (me, thee);
+	praat_new (result.move(), Thing_getName (me), U"_loadings");
 END
 
 FORM (CCA_and_Correlation_getVarianceFraction, U"CCA & Correlation: Get variance fraction", U"CCA & Correlation: Get variance fraction...")
@@ -630,12 +636,12 @@ FORM (CCA_and_Correlation_getVarianceFraction, U"CCA & Correlation: Get variance
 	NATURAL (U"right Canonical variate range", U"1")
 	OK
 DO
-	CCA cca = FIRST (CCA);
-	Correlation c = FIRST (Correlation);
+	CCA me = FIRST (CCA);
+	Correlation thee = FIRST (Correlation);
 	int x_or_y = GET_INTEGER (U"X or Y");
 	int cv_from = GET_INTEGER (U"left Canonical variate range");
 	int cv_to = GET_INTEGER (U"right Canonical variate range");
-	Melder_information (CCA_and_Correlation_getVarianceFraction (cca, c, x_or_y, cv_from, cv_to),
+	Melder_information (CCA_and_Correlation_getVarianceFraction (me, thee, x_or_y, cv_from, cv_to),
 		U" (fraction variance from ", (x_or_y == 1 ? U"y" : U"x"), U", extracted by canonical variates ",
 		cv_from, U" to ", cv_to, U")");
 END
@@ -651,30 +657,31 @@ FORM (CCA_and_Correlation_getRedundancy_sl, U"CCA & Correlation: Get Stewart-Lov
 	LABEL (U"", U"...given the availability of the data in the other set.")
 	OK
 DO
-	CCA cca = FIRST (CCA);
-	Correlation c = FIRST (Correlation);
+	CCA me = FIRST (CCA);
+	Correlation thee = FIRST (Correlation);
 	int x_or_y = GET_INTEGER (U"X or Y");
 	int cv_from = GET_INTEGER (U"left Canonical variate range");
 	int cv_to = GET_INTEGER (U"right Canonical variate range");
-	Melder_information (CCA_and_Correlation_getRedundancy_sl (cca, c, x_or_y, cv_from, cv_to),
+	Melder_information (CCA_and_Correlation_getRedundancy_sl (me, thee, x_or_y, cv_from, cv_to),
 		U" (redundancy from ", (x_or_y == 1 ? U"y" : U"x"), U" extracted by canonical variates ",
 		cv_from, U" to ", cv_to, U")");
 END
 
 DIRECT (CCA_and_TableOfReal_factorLoadings)
-	CCA cca = FIRST (CCA);
-	TableOfReal tr = FIRST (TableOfReal);
-	praat_new (CCA_and_TableOfReal_factorLoadings (cca, tr), Thing_getName (cca), U"_loadings");
+	CCA me = FIRST (CCA);
+	TableOfReal thee = FIRST (TableOfReal);
+	autoTableOfReal result = CCA_and_TableOfReal_factorLoadings (me, thee);
+	praat_new (result.move(), Thing_getName (me), U"_loadings");
 END
 
 FORM (CCA_and_TableOfReal_scores, U"CCA & TableOfReal: To TableOfReal (scores)", U"CCA & TableOfReal: To TableOfReal (scores)...")
 	INTEGER (U"Number of canonical correlations", U"0 (=all)")
 	OK
 DO
-	CCA cca = FIRST (CCA);
-	TableOfReal tr = FIRST (TableOfReal);
-	praat_new (CCA_and_TableOfReal_scores (cca, tr, GET_INTEGER (U"Number of canonical correlations")),
-		Thing_getName (cca), U"_scores");
+	CCA me = FIRST (CCA);
+	TableOfReal thee = FIRST (TableOfReal);
+	autoTableOfReal result = CCA_and_TableOfReal_scores (me, thee, GET_INTEGER (U"Number of canonical correlations"));
+	praat_new (result.move(), Thing_getName (me), U"_scores");
 END
 
 FORM (CCA_and_TableOfReal_predict, U"CCA & TableOfReal: Predict", U"CCA & TableOfReal: Predict...")
@@ -682,9 +689,10 @@ FORM (CCA_and_TableOfReal_predict, U"CCA & TableOfReal: Predict", U"CCA & TableO
 	INTEGER (U"Column number", U"1")
 	OK
 DO
-	CCA cca = FIRST (CCA);
-	TableOfReal tr = FIRST (TableOfReal);
-	praat_new (CCA_and_TableOfReal_predict (cca, tr, GET_INTEGER (U"Column number")), tr->name, U"_", cca->name);
+	CCA me = FIRST (CCA);
+	TableOfReal thee = FIRST (TableOfReal);
+	autoTableOfReal result = CCA_and_TableOfReal_predict (me, thee, GET_INTEGER (U"Column number"));
+	praat_new (result.move(), thy name, U"_", my name);
 END
 
 /***************** ChebyshevSeries ****************************************/
@@ -705,13 +713,15 @@ FORM (ChebyshevSeries_create, U"Create ChebyshevSeries", U"Create ChebyshevSerie
 DO
 	double xmin = GET_REAL (U"Xmin"), xmax = GET_REAL (U"Xmax");
 	REQUIRE (xmin < xmax, U"Xmin must be smaller than Xmax.")
-	praat_new (ChebyshevSeries_createFromString (xmin, xmax, GET_STRING (U"Coefficients")), GET_STRING (U"Name"));
+	autoChebyshevSeries me = ChebyshevSeries_createFromString (xmin, xmax, GET_STRING (U"Coefficients"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END
 
 DIRECT (ChebyshevSeries_to_Polynomial)
 	LOOP {
 		iam (ChebyshevSeries);
-		praat_new (ChebyshevSeries_to_Polynomial (me), my name);
+		autoPolynomial thee = ChebyshevSeries_to_Polynomial (me);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -747,31 +757,35 @@ END
 DIRECT (ClassificationTable_to_Confusion_old)
 	LOOP {
 		iam (ClassificationTable);
-		praat_new (ClassificationTable_to_Confusion (me, 0), my name);
+		autoConfusion thee = ClassificationTable_to_Confusion (me, false);
+		praat_new (thee.move(), my name);
 	}
 END
 
 FORM (ClassificationTable_to_Confusion, U"ClassificationTable: To Confusion", U"ClassificationTable: To Confusion...")
-	BOOLEAN (U"Only class labels", 1)
+	BOOLEAN (U"Only class labels", true)
 	OK
 DO
 	LOOP {
 		iam (ClassificationTable);
-		praat_new (ClassificationTable_to_Confusion (me, GET_INTEGER (U"Only class labels")), my name);
+		autoConfusion thee = ClassificationTable_to_Confusion (me, GET_INTEGER (U"Only class labels"));
+		praat_new (thee.move(), my name);
 	}
 END
 
 DIRECT (ClassificationTable_to_Correlation_columns)
 	LOOP {
 		iam (ClassificationTable);
-		praat_new (ClassificationTable_to_Correlation_columns (me), my name, U"_col");
+		autoCorrelation thee = ClassificationTable_to_Correlation_columns (me);
+		praat_new (thee.move(), my name, U"_col");
 	}
 END
 
 DIRECT (ClassificationTable_to_Strings_maximumProbability)
 	LOOP {
 		iam (ClassificationTable);
-		praat_new (ClassificationTable_to_Strings_maximumProbability (me), my name);
+		autoStrings thee = ClassificationTable_to_Strings_maximumProbability (me);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -787,7 +801,7 @@ FORM (Confusion_createSimple, U"Create simple Confusion", U"Create simple Confus
 	OK
 DO
 	autoConfusion thee = Confusion_createSimple (GET_STRING (U"Labels"));
-	praat_new (thee.transfer(), GET_STRING (U"Name"));
+	praat_new (thee.move(), GET_STRING (U"Name"));
 END
 
 FORM (Confusion_increase, U"Confusion: Increase", U"Confusion: Increase...")
@@ -840,7 +854,7 @@ DIRECT (Confusion_to_TableOfReal_marginals)
 	LOOP {
 		iam (Confusion);
 		autoTableOfReal thee = Confusion_to_TableOfReal_marginals (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -852,7 +866,7 @@ DIRECT (Confusion_difference)
 	}
 	Melder_assert (c1 && c2);
 	autoMatrix thee = Confusion_difference (c1, c2);
-	praat_new (thee.transfer(), U"diffs");
+	praat_new (thee.move(), U"diffs");
 END
 
 FORM (Confusion_condense, U"Confusion: Condense", U"Confusion: Condense...")
@@ -867,8 +881,8 @@ DO
 	LOOP {
 		iam (Confusion);
 		autoConfusion thee = Confusion_condense (me, GET_STRING (U"Search"), GET_STRING (U"Replace"),
-		GET_INTEGER (U"Replace limit"), GET_INTEGER (U"Search and replace are") - 1);
-		praat_new (thee.transfer(), my name, U"_cnd");
+			GET_INTEGER (U"Replace limit"), GET_INTEGER (U"Search and replace are") - 1);
+		praat_new (thee.move(), my name, U"_cnd");
 	}
 END
 
@@ -882,8 +896,8 @@ DO
 	LOOP {
 		iam (Confusion);
 		autoConfusion thee = Confusion_group (me, GET_STRING (U"Stimuli & Responses"), newlabel,
-		GET_INTEGER (U"New label position"));
-		praat_new (thee.transfer(), my name, U"_sr", newlabel);
+			GET_INTEGER (U"New label position"));
+		praat_new (thee.move(), my name, U"_sr", newlabel);
 	}
 END
 
@@ -897,8 +911,8 @@ DO
 	LOOP {
 		iam (Confusion);
 		autoConfusion thee = Confusion_groupStimuli (me, GET_STRING (U"Stimuli"), newlabel,
-		GET_INTEGER (U"New label position"));
-		praat_new (thee.transfer(), my name, U"_s", newlabel);
+			GET_INTEGER (U"New label position"));
+		praat_new (thee.move(), my name, U"_s", newlabel);
 	}
 END
 
@@ -912,8 +926,8 @@ DO
 	LOOP {
 		iam (Confusion);
 		autoConfusion thee = Confusion_groupResponses (me, GET_STRING (U"Responses"), newlabel,
-		GET_INTEGER (U"New label position"));
-		praat_new (thee.transfer(), my name, U"_s", newlabel);
+			GET_INTEGER (U"New label position"));
+		praat_new (thee.move(), my name, U"_s", newlabel);
 	}
 END
 
@@ -931,14 +945,15 @@ DO
 	LOOP {
 		iam (Confusion);
 		Confusion_drawAsNumbers (me, GRAPHICS, GET_INTEGER (U"Draw marginals"),
-		GET_INTEGER (U"Format"), GET_INTEGER (U"Precision"));
+			GET_INTEGER (U"Format"), GET_INTEGER (U"Precision"));
 	}
 END
 
 DIRECT (Confusion_getFractionCorrect)
 	LOOP {
 		iam (Confusion);
-		double f; long n;
+		double f;
+		long n;
 		Confusion_getFractionCorrect (me, &f, &n);
 		Melder_information (f, U" (fraction correct)");
 	}
@@ -984,7 +999,7 @@ DO
 	LOOP {
 		iam (ComplexSpectrogram);
 		autoSound thee = ComplexSpectrogram_to_Sound (me, GET_REAL (U"Duration factor"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -992,7 +1007,7 @@ DIRECT (ComplexSpectrogram_to_Spectrogram)
 	LOOP {
 		iam (ComplexSpectrogram);
 		autoSpectrogram thee = ComplexSpectrogram_to_Spectrogram (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -1003,7 +1018,7 @@ DO
 	LOOP {
 		iam (ComplexSpectrogram);
 		autoSpectrum thee = ComplexSpectrogram_to_Spectrum (me, GET_REAL (U"Time"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -1017,15 +1032,16 @@ FORM (Correlation_confidenceIntervals, U"Correlation: Confidence intervals...",
 	POSITIVE (U"Confidence level (0-1)", U"0.95")
 	INTEGER (U"Number of tests (Bonferroni correction)", U"0")
 	RADIO (U"Approximation", 1)
-	RADIOBUTTON (U"Ruben")
-	RADIOBUTTON (U"Fisher")
+		RADIOBUTTON (U"Ruben")
+		RADIOBUTTON (U"Fisher")
 	OK
 DO
 	double cl = GET_REAL (U"Confidence level");
 	long numberOfTests = GET_INTEGER (U"Number of tests");
 	LOOP {
 		iam (Correlation);
-		praat_new (Correlation_confidenceIntervals (me, cl, numberOfTests, GET_INTEGER (U"Approximation")), U"conf_intervals");
+		autoTableOfReal thee = Correlation_confidenceIntervals (me, cl, numberOfTests, GET_INTEGER (U"Approximation"));
+		praat_new (thee.move(), U"conf_intervals");
 	}
 END
 
@@ -1033,20 +1049,21 @@ FORM (Correlation_testDiagonality_bartlett, U"Correlation: Get diagonality (bart
 	NATURAL (U"Number of contraints", U"1")
 	OK
 DO
-	double chisq, p;
 	long nc = GET_INTEGER (U"Number of contraints");
 	LOOP {
 		iam (Correlation);
+		double chisq, p;
 		Correlation_testDiagonality_bartlett (me, nc, &chisq, &p);
 		Melder_information (p, U" (=probability, based on chisq = ",
-			chisq, U"and ndf = ", my numberOfRows * (my numberOfRows - 1) / 2);
+			chisq, U"and ndf = ", my numberOfRows * (my numberOfRows - 1) / 2, U")");
 	}
 END
 
 DIRECT (Correlation_to_PCA)
 	LOOP {
 		iam (Correlation);
-		praat_new (SSCP_to_PCA (me), my name);
+		autoPCA thee = SSCP_to_PCA (me);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -1063,8 +1080,9 @@ FORM (Covariance_createSimple, U"Create simple Covariance", U"Create simple Cova
 	NATURAL (U"Number of observations", U"100")
 	OK
 DO
-	praat_new (Covariance_createSimple (GET_STRING (U"Covariances"), GET_STRING (U"Centroid"),
-		GET_INTEGER (U"Number of observations")), GET_STRING (U"Name"));
+	autoCovariance me = Covariance_createSimple (GET_STRING (U"Covariances"), GET_STRING (U"Centroid"),
+		GET_INTEGER (U"Number of observations"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END
 
 FORM (Covariance_getProbabilityAtPosition, U"Covariance: Get probability at position", 0)
@@ -1089,8 +1107,8 @@ FORM (Covariance_getSignificanceOfOneMean, U"Covariance: Get significance of one
 DO
 	LOOP {
 		iam (Covariance);
-		double t, p; double ndf;
-		Covariance_getSignificanceOfOneMean (me, GET_INTEGER (U"Index"), GET_REAL (U"Value"), &p, &t , &ndf);
+		double p, t, ndf;
+		Covariance_getSignificanceOfOneMean (me, GET_INTEGER (U"Index"), GET_REAL (U"Value"), &p, &t, &ndf);
 		Melder_information (p, U" (=probability, based on t = ", t, U" and ndf = ", ndf);
 	}
 END
@@ -1109,9 +1127,9 @@ FORM (Covariance_getSignificanceOfMeansDifference, U"Covariance: Get significanc
 DO
 	LOOP {
 		iam (Covariance);
-		double t, p; double ndf;
+		double p, t, ndf;
 		Covariance_getSignificanceOfMeansDifference (me, GET_INTEGER (U"Index1"), GET_INTEGER (U"Index2"),
-		GET_REAL (U"Value"), GET_INTEGER (U"Paired"), GET_INTEGER (U"Equal variances"), &p, &t , &ndf);
+			GET_REAL (U"Value"), GET_INTEGER (U"Paired"), GET_INTEGER (U"Equal variances"), &p, &t, &ndf);
 		Melder_information (p, U" (=probability, based on t = ",
 			t, U"and ndf = ", ndf, U")");
 	}
@@ -1127,7 +1145,7 @@ FORM (Covariance_getSignificanceOfOneVariance, U"Covariance: Get significance of
 DO
 	LOOP {
 		iam (Covariance);
-		double chisq, p; long ndf;
+		double p, chisq; long ndf;
 		Covariance_getSignificanceOfOneVariance (me, GET_INTEGER (U"Index"), GET_REAL (U"Value"), &p, &chisq , &ndf);
 		Melder_information (p, U" (=probability, based on chisq = ", chisq, U"and ndf = ", ndf);
 	}
@@ -1141,9 +1159,9 @@ FORM (Covariance_getSignificanceOfVariancesRatio, U"Covariance: Get significance
 DO
 	LOOP {
 		iam (Covariance);
-		double f, p; long ndf;
+		double p, f; long ndf;
 		Covariance_getSignificanceOfVariancesRatio (me, GET_INTEGER (U"Index1"), GET_INTEGER (U"Index2"),
-		GET_REAL (U"Hypothesized ratio"), &p, &f , &ndf);
+			GET_REAL (U"Hypothesized ratio"), &p, &f , &ndf);
 		Melder_information (p, U" (=probability, based on F = ", f,
 		U"and ndf1 = ", ndf, U" and ndf2 = ", ndf);
 	}
@@ -1162,17 +1180,17 @@ END
 
 FORM (Covariances_reportMultivariateMeanDifference, U"Covariances: Report multivariate mean difference",
       U"Covariances: Report multivariate mean difference...")
-	BOOLEAN (U"Covariances are equal", 1)
+	BOOLEAN (U"Covariances are equal", true)
 	OK
 DO
-	Covariance c1 = 0, c2 = 0;
+	Covariance c1 = nullptr, c2 = nullptr;
 	LOOP {
 		iam (Covariance);
 		(c1 ? c2 : c1) = me;
 	}
 	Melder_assert (c1 && c2);
 	double prob, fisher, df1, df2, difference;
-	int equalCovariances = GET_INTEGER (U"Covariances are equal");
+	bool equalCovariances = GET_INTEGER (U"Covariances are equal");
 	MelderInfo_open ();
 	difference = Covariances_getMultivariateCentroidDifference (c1, c2, equalCovariances, &prob, &fisher, &df1, &df2);
 	MelderInfo_writeLine (U"Under the assumption that the two covariances are", (equalCovariances ? U" " : U" not "), U"equal:");
@@ -1180,8 +1198,7 @@ DO
 	MelderInfo_writeLine (U"Fisher's F = ", fisher);
 	MelderInfo_writeLine (U"Significance from zero = ", prob);
 	MelderInfo_writeLine (U"Degrees of freedom = ", df1, U", ", df2);
-	MelderInfo_writeLine (U"(Number of observations = ", c1->numberOfObservations, U", ",
-		c2->numberOfObservations);
+	MelderInfo_writeLine (U"(Number of observations = ", c1->numberOfObservations, U", ", c2->numberOfObservations);
 	MelderInfo_writeLine (U"Dimension of covariance matrices = ", c1-> numberOfRows, U")");
 	MelderInfo_close ();
 END
@@ -1192,39 +1209,40 @@ FORM (Covariance_to_TableOfReal_randomSampling, U"Covariance: To TableOfReal (ra
 DO
 	LOOP {
 		iam (Covariance);
-		praat_new (Covariance_to_TableOfReal_randomSampling (me, GET_INTEGER (U"Number of data points")), my name);
+		autoTableOfReal thee = Covariance_to_TableOfReal_randomSampling (me, GET_INTEGER (U"Number of data points"));
+		praat_new (thee.move(), my name);
 	}
 END
 
 DIRECT (Covariances_reportEquality)
 	autoCollection set = praat_getSelectedObjects ();
 	MelderInfo_open ();
-	{
-		double chisq, p, df;
-		Covariances_equality (set.peek(), 1, &p, &chisq, &df);
-		MelderInfo_writeLine (U"Difference between covariance matrices:");
-		MelderInfo_writeLine (U"Significance of difference (bartlett) = ", p);
-		MelderInfo_writeLine (U"Chi-squared = ", chisq);
-		MelderInfo_writeLine (U"Degrees of freedom = ", df);
-		Covariances_equality (set.peek(), 2, &p, &chisq, &df);
-		MelderInfo_writeLine (U"Significance of difference (wald) = ", p);
-		MelderInfo_writeLine (U"Chi-squared = ", chisq);
-		MelderInfo_writeLine (U"Degrees of freedom = ", df);
-	}
+	double p, chisq, df;
+	Covariances_equality (set.peek(), 1, &p, &chisq, &df);
+	MelderInfo_writeLine (U"Difference between covariance matrices:");
+	MelderInfo_writeLine (U"Significance of difference (bartlett) = ", p);
+	MelderInfo_writeLine (U"Chi-squared = ", chisq);
+	MelderInfo_writeLine (U"Degrees of freedom = ", df);
+	Covariances_equality (set.peek(), 2, &p, &chisq, &df);
+	MelderInfo_writeLine (U"Significance of difference (wald) = ", p);
+	MelderInfo_writeLine (U"Chi-squared = ", chisq);
+	MelderInfo_writeLine (U"Degrees of freedom = ", df);
 	MelderInfo_close ();
 END
 
 DIRECT (Covariance_to_Correlation)
 	LOOP {
 		iam (Covariance);
-		praat_new (SSCP_to_Correlation (me), my name);
+		autoCorrelation thee = SSCP_to_Correlation (me);
+		praat_new (thee.move(), my name);
 	}
 END
 
 DIRECT (Covariance_to_PCA)
 	LOOP {
 		iam (Covariance);
-		praat_new (SSCP_to_PCA (me), my name);
+		autoPCA thee = SSCP_to_PCA (me);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -1232,9 +1250,9 @@ FORM (Covariance_and_TableOfReal_mahalanobis, U"Covariance & TableOfReal: To Tab
 	BOOLEAN (U"Centroid from table", 0)
 	OK
 DO
-	Covariance cov = FIRST (Covariance);
-	TableOfReal tr = FIRST (TableOfReal);
-	praat_new (Covariance_and_TableOfReal_mahalanobis (cov, tr, GET_INTEGER (U"Centroid from table")), U"mahalanobis");
+	Covariance me = FIRST (Covariance);
+	TableOfReal thee = FIRST (TableOfReal);
+	praat_new (Covariance_and_TableOfReal_mahalanobis (me, thee, GET_INTEGER (U"Centroid from table")), U"mahalanobis");
 END
 
 /********************** Discriminant **********************************/
@@ -1258,7 +1276,7 @@ DO
 	Discriminant me = FIRST (Discriminant);
 	Pattern pat = FIRST (Pattern);
 	autoCategories thee = Discriminant_and_Pattern_to_Categories (me, pat, GET_INTEGER (U"Pool covariance matrices"), GET_INTEGER (U"Use apriori probabilities"));
-	praat_new (thee.transfer(), my name, U"_", pat->name);
+	praat_new (thee.move(), my name, U"_", pat->name);
 END
 
 FORM (Discriminant_and_TableOfReal_to_Configuration, U"Discriminant & TableOfReal: To Configuration", U"Discriminant & TableOfReal: To Configuration...")
@@ -1270,7 +1288,7 @@ DO
 	Discriminant me = FIRST (Discriminant);
 	TableOfReal tr = FIRST_GENERIC (TableOfReal);
 	autoConfiguration thee = Discriminant_and_TableOfReal_to_Configuration (me, tr, dimension);
-	praat_new (thee.transfer(), my name, U"_", tr->name);
+	praat_new (thee.move(), my name, U"_", tr->name);
 END
 
 DIRECT (hint_Discriminant_and_TableOfReal_to_ClassificationTable)
@@ -1286,7 +1304,7 @@ DO
 	TableOfReal tr = FIRST_GENERIC (TableOfReal);
 	autoClassificationTable thee = Discriminant_and_TableOfReal_to_ClassificationTable (me, tr,
 		GET_INTEGER (U"Pool covariance matrices"), GET_INTEGER (U"Use apriori probabilities"));
-	praat_new (thee.transfer(), my name, U"_", tr->name);
+	praat_new (thee.move(), my name, U"_", tr->name);
 END
 
 FORM (Discriminant_and_TableOfReal_mahalanobis, U"Discriminant & TableOfReal: To TableOfReal (mahalanobis)", U"Discriminant & TableOfReal: To TableOfReal (mahalanobis)...")
@@ -1299,7 +1317,7 @@ DO
 	long group = Discriminant_groupLabelToIndex (me, GET_STRING (U"Group label"));
 	REQUIRE (group > 0, U"Group label does not exist.")
 	autoTableOfReal thee = Discriminant_and_TableOfReal_mahalanobis (me, tr, group, GET_INTEGER (U"Pool covariance matrices"));
-	praat_new (thee.transfer(), U"mahalanobis");
+	praat_new (thee.move(), U"mahalanobis");
 END
 
 FORM (Discriminant_getWilksLambda, U"Discriminant: Get Wilks' lambda", U"Discriminant: Get Wilks' lambda...")
@@ -1323,7 +1341,7 @@ DO
 	LOOP {
 		iam (Discriminant);
 		Melder_information (Eigen_getCumulativeContributionOfComponents (me,
-		GET_INTEGER (U"From component"), GET_INTEGER (U"To component")));
+			GET_INTEGER (U"From component"), GET_INTEGER (U"To component")));
 	}
 END
 
@@ -1332,13 +1350,13 @@ FORM (Discriminant_getPartialDiscriminationProbability, U"Discriminant: Get part
 	INTEGER (U"Number of dimensions", U"1")
 	OK
 DO
-	long ndf, n = GET_INTEGER (U"Number of dimensions");
-	double chisq, p;
+	long n = GET_INTEGER (U"Number of dimensions");
 	REQUIRE (n >= 0, U"Number of dimensions must be greater than or equal to zero.")
 	LOOP {
 		iam (Discriminant);
+		double p, chisq; long ndf;
 		Discriminant_getPartialDiscriminationProbability (me, n, &p, &chisq, &ndf);
-		Melder_information (p, U" (=probability, based on chisq = ", chisq, U"and ndf = ", ndf);
+		Melder_information (p, U" (=probability, based on chisq = ", chisq, U"and ndf = ", ndf, U")");
 	}
 END
 
@@ -1348,7 +1366,7 @@ DIRECT (Discriminant_getHomegeneityOfCovariances_box)
 		double chisq, p; long ndf;
 		SSCPs_getHomegeneityOfCovariances_box ( (SSCPs) my groups, &p, &chisq, &ndf);
 		Melder_information (p, U" (=probability, based on chisq = ",
-		chisq, U"and ndf = ", ndf);
+			chisq, U"and ndf = ", ndf, U")");
 	}
 END
 
@@ -1539,7 +1557,7 @@ DIRECT (Discriminant_extractBetweenGroupsSSCP)
 	LOOP {
 		iam (Discriminant);
 		autoSSCP thee = Discriminant_extractBetweenGroupsSSCP (me);
-		praat_new (thee.transfer());
+		praat_new (thee.move());
 	}
 END
 
@@ -1547,7 +1565,7 @@ DIRECT (Discriminant_extractGroupCentroids)
 	LOOP {
 		iam (Discriminant);
 		autoTableOfReal thee = Discriminant_extractGroupCentroids (me);
-		praat_new (thee.transfer(), U"centroids");
+		praat_new (thee.move(), U"centroids");
 	}
 END
 
@@ -1555,7 +1573,7 @@ DIRECT (Discriminant_extractGroupStandardDeviations)
 	LOOP {
 		iam (Discriminant);
 		autoTableOfReal thee = Discriminant_extractGroupStandardDeviations (me);
-		praat_new (thee.transfer(), U"group_stddevs");
+		praat_new (thee.move(), U"group_stddevs");
 	}
 END
 
@@ -1563,7 +1581,7 @@ DIRECT (Discriminant_extractGroupLabels)
 	LOOP {
 		iam (Discriminant);
 		autoStrings thee = Discriminant_extractGroupLabels (me);
-		praat_new (thee.transfer(), U"group_labels");
+		praat_new (thee.move(), U"group_labels");
 	}
 END
 
@@ -1571,7 +1589,7 @@ DIRECT (Discriminant_extractPooledWithinGroupsSSCP)
 	LOOP {
 		iam (Discriminant);
 		autoSSCP thee = Discriminant_extractPooledWithinGroupsSSCP (me);
-		praat_new (thee.transfer(), U"pooled_within");
+		praat_new (thee.move(), U"pooled_within");
 	}
 END
 
@@ -1583,7 +1601,7 @@ DO
 	LOOP {
 		iam (Discriminant);
 		autoSSCP thee = Discriminant_extractWithinGroupSSCP (me, index);
-		praat_new (thee.transfer(), my name, U"_g", index);
+		praat_new (thee.move(), my name, U"_g", index);
 	}
 END
 
@@ -1648,7 +1666,7 @@ DO
     DTW me = FIRST (DTW);
     Polygon thee = FIRST (Polygon);
     autoMatrix him = DTW_and_Polygon_to_Matrix_cummulativeDistances (me, thee, localSlope);
-    praat_new (him.transfer(), my name, U"_", localSlope);
+    praat_new (him.move(), my name, U"_", localSlope);
 END
 
 FORM (DTW_and_Sounds_draw, U"DTW & Sounds: Draw", U"DTW & Sounds: Draw...")
@@ -1659,7 +1677,7 @@ FORM (DTW_and_Sounds_draw, U"DTW & Sounds: Draw", U"DTW & Sounds: Draw...")
 	BOOLEAN (U"Garnish", 1)
 	OK
 DO
-	Sound s1 = 0, s2 = 0; DTW dtw = 0;
+	Sound s1 = nullptr, s2 = nullptr; DTW dtw = nullptr;
 	LOOP {
 		iam (Daata);
 		if (CLASS == classSound) {
@@ -1684,7 +1702,7 @@ FORM (DTW_and_Sounds_drawWarpX, U"DTW & Sounds: Draw warp (x)", U"DTW & Sounds:
 	BOOLEAN (U"Garnish", 1)
 	OK
 DO
-	Sound s1 = 0, s2 = 0;
+	Sound s1 = nullptr, s2 = nullptr;
 	LOOP {
 		iam (Sound);
 		(s1 ? s2 : s1) = me;
@@ -1704,10 +1722,10 @@ void DTW_constraints_addCommonFields (UiForm dia) {
 	BOOLEAN (U"Match begin positions", 0)
 	BOOLEAN (U"Match end positions", 0)
 	RADIO (U"Slope constraint", 1)
-	RADIOBUTTON (U"no restriction")
-	RADIOBUTTON (U"1/3 < slope < 3")
-	RADIOBUTTON (U"1/2 < slope < 2")
-	RADIOBUTTON (U"2/3 < slope < 3/2")
+		RADIOBUTTON (U"no restriction")
+		RADIOBUTTON (U"1/3 < slope < 3")
+		RADIOBUTTON (U"1/2 < slope < 2")
+		RADIOBUTTON (U"2/3 < slope < 3/2")
 }
 
 void DTW_constraints_getCommonFields (UiForm dia, int *begin, int *end, int *slope) {
@@ -2101,7 +2119,7 @@ DO
     LOOP {
         iam (DTW);
         autoMatrix thee = DTW_to_Matrix_cummulativeDistances (me, band, slope);
-        praat_new (thee.transfer(), my name, U"_cd");
+        praat_new (thee.move(), my name, U"_cd");
     }
 END
 
@@ -2119,7 +2137,7 @@ DO
     LOOP {
         iam (DTW);
         autoPolygon thee = DTW_to_Polygon (me, band, slope);
-        praat_new (thee.transfer(), my name);
+        praat_new (thee.move(), my name);
     }
 END
 
@@ -2127,7 +2145,7 @@ DIRECT (DTW_to_Matrix_distances)
 	LOOP {
 		iam (DTW);
 		autoMatrix thee = DTW_to_Matrix_distances (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -2135,7 +2153,7 @@ DIRECT (DTW_swapAxes)
 	LOOP {
 		iam (DTW);
 		autoDTW thee = DTW_swapAxes (me);
-		praat_new (thee.transfer(), my name, U"_axesSwapped");
+		praat_new (thee.move(), my name, U"_axesSwapped");
 	}
 END
 
@@ -2150,14 +2168,14 @@ DIRECT (DTW_and_TextGrid_to_TextGrid)
 	DTW me = FIRST (DTW);
 	TextGrid tg = FIRST (TextGrid);
 	autoTextGrid thee = DTW_and_TextGrid_to_TextGrid (me, tg, 0);
-	praat_new (thee.transfer(), tg -> name, U"_", my name);
+	praat_new (thee.move(), tg -> name, U"_", my name);
 END
 
 DIRECT (DTW_and_IntervalTier_to_Table)
 	DTW me = FIRST (DTW);
 	IntervalTier ti = FIRST (IntervalTier);
 	autoTable thee = DTW_and_IntervalTier_to_Table (me, ti, 1.0/44100);
-	praat_new (thee.transfer(), my name);
+	praat_new (thee.move(), my name);
 END
 
 /******************** EditDistanceTable & EditCostsTable ********************************************/
@@ -2170,7 +2188,7 @@ DIRECT (EditDistanceTable_to_TableOfReal_directions)
 	LOOP {
 		iam (EditDistanceTable);
 		autoTableOfReal thee = EditDistanceTable_to_TableOfReal_directions (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -2373,7 +2391,7 @@ DIRECT (EditCostsTable_to_TableOfReal)
 	LOOP {
 		iam (EditCostsTable);
 		autoTableOfReal thee = EditCostsTable_to_TableOfReal (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -2388,7 +2406,7 @@ DO
 	long numberOfSourceSymbols = GET_INTEGER (U"Number of source symbols");
 	numberOfSourceSymbols = numberOfSourceSymbols < 0 ? 0 : numberOfSourceSymbols;
 	autoEditCostsTable thee = EditCostsTable_create (numberOfTargetSymbols, numberOfSourceSymbols);
-	praat_new (thee.transfer(), GET_STRING (U"Name"));
+	praat_new (thee.move(), GET_STRING (U"Name"));
 END
 
 /******************** Eigen ********************************************/
@@ -2508,21 +2526,21 @@ DO
 	Eigen me = FIRST_GENERIC (Eigen);
 	Matrix thee = FIRST_GENERIC (Matrix);
 	autoMatrix him = Eigen_and_Matrix_project (me, thee, GET_INTEGER (U"Number of dimensions"));
-	praat_new (him.transfer(), my name, U"_", thy name);
+	praat_new (him.move(), my name, U"_", thy name);
 END
 
 DIRECT (Eigen_and_SSCP_project)
 	Eigen me = FIRST_GENERIC (Eigen);
 	SSCP cp = FIRST (SSCP);
 	autoSSCP thee = Eigen_and_SSCP_project (me, cp);
-	praat_new (thee.transfer(), my name, U"_", cp->name);
+	praat_new (thee.move(), my name, U"_", cp->name);
 END
 
 DIRECT (Eigen_and_Covariance_project)
 	Eigen me = FIRST_GENERIC (Eigen);
 	Covariance cv = FIRST (Covariance);
 	autoCovariance thee = Eigen_and_Covariance_project (me, cv);
-	praat_new (thee.transfer(), my name, U"_", cv->name);
+	praat_new (thee.move(), my name, U"_", cv->name);
 END
 
 /******************** Index ********************************************/
@@ -2603,8 +2621,8 @@ FORM (Index_extractPart, U"Index: Extract part", U"Index: Extract part...")
 DO
 	LOOP {
 		iam (Index);
-		praat_new (Index_extractPart (me, GET_INTEGER (U"left Range"), GET_INTEGER (U"right Range")),
-		Thing_getName (me), U"_part");
+		autoIndex thee = Index_extractPart (me, GET_INTEGER (U"left Range"), GET_INTEGER (U"right Range"));
+		praat_new (thee.move(), Thing_getName (me), U"_part");
 	}
 END
 
@@ -2614,14 +2632,16 @@ FORM (Index_to_Permutation, U"Index: To Permutation", U"Index: To Permutation...
 DO
 	LOOP {
 		iam (Index);
-		praat_new (Index_to_Permutation_permuteRandomly (me, GET_INTEGER (U"Permute within classes")), my name);
+		autoPermutation thee = Index_to_Permutation_permuteRandomly (me, GET_INTEGER (U"Permute within classes"));
+		praat_new (thee.move(), my name);
 	}
 END
 
 DIRECT (StringsIndex_to_Strings)
 	LOOP {
 		iam (StringsIndex);
-		praat_new (StringsIndex_to_Strings (me), my name);
+		autoStrings thee = StringsIndex_to_Strings (me);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -2634,7 +2654,7 @@ DIRECT (Excitation_to_Excitations)
 		autoExcitation thee = Data_copy (me);
 		Collection_addItem (e.peek(), thee.transfer());
 	}
-	praat_new (e.transfer(), U"appended");
+	praat_new (e.move(), U"appended");
 END
 
 /******************** Excitations ********************************************/
@@ -2669,7 +2689,7 @@ DO
 	LOOP {
 		iam (Excitations);
 		autoExcitation thee = Excitations_getItem (me, GET_INTEGER (U"Item number"));
-		praat_new (thee.transfer(), my name, U"_item");
+		praat_new (thee.move(), my name, U"_item");
 	}
 END
 
@@ -2680,7 +2700,8 @@ DIRECT (Excitations_append)
 		(e1 ? e2 : e1) = me;
 	}
 	Melder_assert (e1 && e2);
-	praat_new ( (Excitations) Collections_merge (e1, e2), U"appended");
+	autoCollection result = Collections_merge (e1, e2);
+	praat_new (result.move(), U"appended");
 END
 
 FORM (Excitations_to_Pattern, U"Excitations: To Pattern", 0)
@@ -2690,7 +2711,7 @@ DO
 	LOOP {
 		iam (Excitations);
 		autoPattern thee = Excitations_to_Pattern (me, GET_INTEGER (U"Join"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -2698,7 +2719,7 @@ DIRECT (Excitations_to_TableOfReal)
 	LOOP {
 		iam (Excitations);
 		autoTableOfReal thee = Excitations_to_TableOfReal (me);
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -2708,7 +2729,7 @@ END
 
 FORM_READ2 (FileInMemory_create, U"Create file in memory", 0, true) {
 	autoFileInMemory me = FileInMemory_create (file);
-	praat_new (me.transfer(), MelderFile_name (file));
+	praat_new (me.move(), MelderFile_name (file));
 END2 }
 
 FORM (FileInMemory_setId, U"FileInMemory: Set id", 0)
@@ -2746,7 +2767,7 @@ FORM (FilesInMemory_createFromDirectoryContents, U"Create files in memory from d
 	OK
 DO
 	autoFilesInMemory me = FilesInMemory_createFromDirectoryContents (GET_STRING (U"Directory"), GET_STRING (U"Only files that match pattern"));
-	praat_new (me.transfer(), GET_STRING (U"Name"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END
 
 FORM (FilesInMemory_createCopyFromFilesInMemory, U"", 0)
@@ -2762,27 +2783,27 @@ DO
 	long choice = GET_INTEGER (U"Espeakdata");
 	if (choice == 1) {
 		autoFilesInMemory f = (FilesInMemory) Data_copy (espeakdata_phons);
-		praat_new (f.transfer(), U"espeakdata_phons");
+		praat_new (f.move(), U"espeakdata_phons");
 	}
 	else if (choice == 2) {
 		autoFilesInMemory f = (FilesInMemory) Data_copy (espeakdata_dicts);
-		praat_new (f.transfer(), U"espeakdata_dicts");
+		praat_new (f.move(), U"espeakdata_dicts");
 	}
 	else if (choice == 3) {
 		autoFilesInMemory f = (FilesInMemory) Data_copy (espeakdata_voices);
-		praat_new (f.transfer(), U"espeakdata_voices");
+		praat_new (f.move(), U"espeakdata_voices");
 	}
 	else if (choice == 4) {
 		autoFilesInMemory f = (FilesInMemory) Data_copy (espeakdata_variants);
-		praat_new (f.transfer(), U"espeakdata_variants");
+		praat_new (f.move(), U"espeakdata_variants");
 	}
 	else if (choice == 5) {
 		autoStrings s = (Strings) Data_copy (espeakdata_voices_names);
-		praat_new (s.transfer(), U"espeakdata_voices_names");
+		praat_new (s.move(), U"espeakdata_voices_names");
 	}
 	else if (choice == 6) {
 		autoStrings s = (Strings) Data_copy (espeakdata_variants_names);
-		praat_new (s.transfer(), U"espeakdata_variants_names");
+		praat_new (s.move(), U"espeakdata_variants_names");
 	}
 END
 
@@ -2820,7 +2841,7 @@ DIRECT (FileInMemory_to_FilesInMemory)
 		FileInMemory him = Data_copy (me);
 		Collection_addItem (thee.peek(), him);
 	}
-	praat_new (thee.transfer(), U"files");
+	praat_new (thee.move(), U"files");
 END
 
 DIRECT (FilesInMemory_addItems)
@@ -2835,17 +2856,18 @@ DIRECT (FilesInMemory_addItems)
 END
 
 DIRECT (FilesInMemory_merge)
-	FilesInMemory f1 = 0, f2 = 0;
+	FilesInMemory f1 = nullptr, f2 = nullptr;
 	LOOP { iam (FilesInMemory); (f1 ? f2 : f1) = me; }
 	Melder_assert (f1 != 0 && f2 != 0);
 	autoFilesInMemory fim = (FilesInMemory) Collections_merge (f1, f2);
-	praat_new (fim.transfer(), f1 -> name, U"_", f2 -> name);
+	praat_new (fim.move(), f1 -> name, U"_", f2 -> name);
 END
 
 DIRECT (FilesInMemory_to_Strings_id)
 	LOOP {
 		iam (FilesInMemory);
-		praat_new (FilesInMemory_to_Strings_id (me), my name);
+		autoStrings thee = FilesInMemory_to_Strings_id (me);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -3085,7 +3107,7 @@ DO
 	}
 END
 
-FORM (FilterBank_equalizeIntensities, U"FilterBank: Equalize intensities", U"")
+FORM (FilterBank_equalizeIntensities, U"FilterBank: Equalize intensities", nullptr)
 	REAL (U"Intensity (dB)", U"80.0")
 	OK
 DO
@@ -3096,7 +3118,7 @@ DO
 	}
 END
 
-FORM (BandFilterSpectrogram_equalizeIntensities, U"BandFilterSpectrogram: Equalize intensities", U"")
+FORM (BandFilterSpectrogram_equalizeIntensities, U"BandFilterSpectrogram: Equalize intensities", nullptr)
 	REAL (U"Intensity (dB)", U"80.0")
 	OK
 DO
@@ -3110,89 +3132,93 @@ END
 DIRECT (FilterBank_to_Matrix)
 	LOOP {
 		iam (FilterBank);
-		praat_new (FilterBank_to_Matrix (me), my name);
+		autoMatrix thee = FilterBank_to_Matrix (me);
+		praat_new (thee.move(), my name);
 	}
 END
 
-FORM (BandFilterSpectrogram_to_Matrix, U"(BandFilterSpectrogram: To Matrix", 0)
+FORM (BandFilterSpectrogram_to_Matrix, U"BandFilterSpectrogram: To Matrix", nullptr)
 	BOOLEAN (U"Convert to dB values", 1)
 	OK
 DO
 	LOOP {
 		iam (BandFilterSpectrogram);
-		praat_new (BandFilterSpectrogram_to_Matrix (me, GET_INTEGER (U"Convert to dB values")), my name);
+		autoMatrix thee = BandFilterSpectrogram_to_Matrix (me, GET_INTEGER (U"Convert to dB values"));
+		praat_new (thee.move(), my name);
 	}
 END
 
-FORM (FilterBanks_crossCorrelate, U"FilterBanks: Cross-correlate", 0)
+FORM (FilterBanks_crossCorrelate, U"FilterBanks: Cross-correlate", nullptr)
 	RADIO_ENUM (U"Amplitude scaling", kSounds_convolve_scaling, DEFAULT)
 	RADIO_ENUM (U"Signal outside time domain is...", kSounds_convolve_signalOutsideTimeDomain, DEFAULT)
 	OK
 DO
-	FilterBank f1 = 0, f2 = 0;
+	FilterBank f1 = nullptr, f2 = nullptr;
 	LOOP { iam (FilterBank); (f1 ? f2 : f1) = me; }
-	Melder_assert (f1 != 0 && f2 != 0);
-	praat_new (FilterBanks_crossCorrelate (f1, f2, GET_ENUM (kSounds_convolve_scaling, U"Amplitude scaling"),
-		GET_ENUM (kSounds_convolve_signalOutsideTimeDomain, U"Signal outside time domain is...")),
-		f1 -> name, U"_", f2 -> name);
+	Melder_assert (f1 && f2);
+	autoSound result = FilterBanks_crossCorrelate (f1, f2, GET_ENUM (kSounds_convolve_scaling, U"Amplitude scaling"),
+		GET_ENUM (kSounds_convolve_signalOutsideTimeDomain, U"Signal outside time domain is..."));
+	praat_new (result.move(), f1 -> name, U"_", f2 -> name);
 END
 
-FORM (BandFilterSpectrograms_crossCorrelate, U"BandFilterSpectrograms: Cross-correlate", 0)
+FORM (BandFilterSpectrograms_crossCorrelate, U"BandFilterSpectrograms: Cross-correlate", nullptr)
 	RADIO_ENUM (U"Amplitude scaling", kSounds_convolve_scaling, DEFAULT)
 	RADIO_ENUM (U"Signal outside time domain is...", kSounds_convolve_signalOutsideTimeDomain, DEFAULT)
 	OK
 DO
-	BandFilterSpectrogram f1 = 0, f2 = 0;
+	BandFilterSpectrogram f1 = nullptr, f2 = nullptr;
 	LOOP {
 		iam (BandFilterSpectrogram); 
 		(f1 ? f2 : f1) = me;
 	}
-	Melder_assert (f1 != 0 && f2 != 0);
-	autoSound thee = BandFilterSpectrograms_crossCorrelate (f1, f2, GET_ENUM (kSounds_convolve_scaling, U"Amplitude scaling"),
+	Melder_assert (f1 && f2);
+	autoSound result = BandFilterSpectrograms_crossCorrelate (f1, f2, GET_ENUM (kSounds_convolve_scaling, U"Amplitude scaling"),
 		GET_ENUM (kSounds_convolve_signalOutsideTimeDomain, U"Signal outside time domain is..."));
-	praat_new (thee.transfer(), f1 -> name, U"_", f2 -> name);
+	praat_new (result.move(), f1 -> name, U"_", f2 -> name);
 END
 
-FORM (FilterBanks_convolve, U"FilterBanks: Convolve", 0)
+FORM (FilterBanks_convolve, U"FilterBanks: Convolve", nullptr)
 	RADIO_ENUM (U"Amplitude scaling", kSounds_convolve_scaling, DEFAULT)
 	RADIO_ENUM (U"Signal outside time domain is...", kSounds_convolve_signalOutsideTimeDomain, DEFAULT)
 	OK
 DO
-	FilterBank f1 = 0, f2 = 0;
+	FilterBank f1 = nullptr, f2 = nullptr;
 	LOOP { iam (FilterBank); (f1 ? f2 : f1) = me; }
-	Melder_assert (f1 != 0 && f2 != 0);
-	praat_new (FilterBanks_convolve (f1, f2, GET_ENUM (kSounds_convolve_scaling, U"Amplitude scaling"),
-		GET_ENUM (kSounds_convolve_signalOutsideTimeDomain, U"Signal outside time domain is...")),
-		f1 -> name, U"_", f2 -> name);
+	Melder_assert (f1 && f2);
+	autoSound result = FilterBanks_convolve (f1, f2, GET_ENUM (kSounds_convolve_scaling, U"Amplitude scaling"),
+		GET_ENUM (kSounds_convolve_signalOutsideTimeDomain, U"Signal outside time domain is..."));
+	praat_new (result.move(), f1 -> name, U"_", f2 -> name);
 END
 
-FORM (BandFilterSpectrograms_convolve, U"BandFilterSpectrograms: Convolve", 0)
+FORM (BandFilterSpectrograms_convolve, U"BandFilterSpectrograms: Convolve", nullptr)
 	RADIO_ENUM (U"Amplitude scaling", kSounds_convolve_scaling, DEFAULT)
 	RADIO_ENUM (U"Signal outside time domain is...", kSounds_convolve_signalOutsideTimeDomain, DEFAULT)
 	OK
 DO
-	BandFilterSpectrogram f1 = 0, f2 = 0;
+	BandFilterSpectrogram f1 = nullptr, f2 = nullptr;
 	LOOP {
 		iam (BandFilterSpectrogram);
 		(f1 ? f2 : f1) = me;
 	}
-	Melder_assert (f1 != 0 && f2 != 0);
-	autoSound thee = BandFilterSpectrograms_convolve (f1, f2, GET_ENUM (kSounds_convolve_scaling, U"Amplitude scaling"),
+	Melder_assert (f1 && f2);
+	autoSound result = BandFilterSpectrograms_convolve (f1, f2, GET_ENUM (kSounds_convolve_scaling, U"Amplitude scaling"),
 		GET_ENUM (kSounds_convolve_signalOutsideTimeDomain, U"Signal outside time domain is..."));
-	praat_new (thee.transfer(), f1 -> name, U"_", f2 -> name);
+	praat_new (result.move(), f1 -> name, U"_", f2 -> name);
 END
 
 DIRECT (FilterBank_to_Intensity)
 	LOOP {
 		iam (FilterBank);
-		praat_new (FilterBank_to_Intensity (me), my name);
+		autoIntensity thee = FilterBank_to_Intensity (me);
+		praat_new (thee.move(), my name);
 	}
 END
 
 DIRECT (BandFilterSpectrogram_to_Intensity)
 	LOOP {
 		iam (BandFilterSpectrogram);
-		praat_new (BandFilterSpectrogram_to_Intensity (me), my name);
+		autoIntensity thee = BandFilterSpectrogram_to_Intensity (me);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -3463,7 +3489,7 @@ DO
 		autoTextGrid thee = Intensity_to_TextGrid_detectSilences (me, GET_REAL (U"Silence threshold"),
 			GET_REAL (U"Minimum silent interval duration"), GET_REAL (U"Minimum sounding interval duration"),
 			GET_STRING (U"Silent interval label"), GET_STRING (U"Sounding interval label"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -3483,7 +3509,7 @@ DO
 		autoTextGrid thee = IntensityTier_to_TextGrid_detectSilences (me, GET_REAL (U"Time step"), GET_REAL (U"Silence threshold"),
 			GET_REAL (U"Minimum silent interval duration"), GET_REAL (U"Minimum sounding interval duration"),
 			GET_STRING (U"Silent interval label"), GET_STRING (U"Sounding interval label"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -3494,7 +3520,7 @@ DO
 	LOOP {
 		iam (IntensityTier);
 		autoIntensity thee = IntensityTier_to_Intensity (me, GET_REAL (U"Time step"));
-		praat_new (thee.transfer(), my name);
+		praat_new (thee.move(), my name);
 	}
 END
 
@@ -3520,8 +3546,9 @@ DO
 	if (xmax <= xmin) {
 		Melder_throw (U"Xmin should be smaller than Xmax.");
 	}
-	praat_new (ISpline_createFromStrings (xmin, xmax, degree,
-		GET_STRING (U"Coefficients"), GET_STRING (U"Interior knots")), GET_STRING (U"Name"));
+	autoISpline me = ISpline_createFromStrings (xmin, xmax, degree,
+		GET_STRING (U"Coefficients"), GET_STRING (U"Interior knots"));
+	praat_new (me.move(), GET_STRING (U"Name"));
 END
 
 /******************* KlattTable  *********************************/
@@ -3557,7 +3584,7 @@ FORM (KlattTable_to_Sound, U"KlattTable: To Sound", U"KlattTable: To Sound...")
 DO
 	double flutter = GET_REAL (U"Flutter percentage");
 	int outputType = GET_INTEGER (U"Output type") - 1;
-	if (flutter < 0 || flutter > 100) {
+	if (flutter < 0.0 || flutter > 100.0) {
 		Melder_throw (U"Flutter should be between 0 and 100%.");
 	}
 	LOOP {
@@ -4348,7 +4375,8 @@ FORM (MelSpectrogram_to_MFCC, U"MelSpectrogram: To MFCC", U"MelSpectrogram: To M
 DO
 	LOOP {
 		iam (MelSpectrogram);
-		praat_new (MelSpectrogram_to_MFCC (me, GET_INTEGER (U"Number of coefficients")), my name);
+		autoMFCC thee = MelSpectrogram_to_MFCC (me, GET_INTEGER (U"Number of coefficients"));
+		praat_new (thee.transfer(), my name);
 	}
 END
 
@@ -4406,8 +4434,9 @@ FORM (MFCC_to_MelSpectrogram, U"MFCC: MelSpectrogram", U"MFCC: To MelSpectrogram
 DO
 	LOOP {
 		iam (MFCC);
-		praat_new (MFCC_to_MelSpectrogram (me, GET_INTEGER (U"From coefficient"), GET_INTEGER (U"To coefficient"),
-			GET_INTEGER (U"Include constant term")), my name);
+		autoMelSpectrogram thee = MFCC_to_MelSpectrogram (me, GET_INTEGER (U"From coefficient"), GET_INTEGER (U"To coefficient"),
+			GET_INTEGER (U"Include constant term"));
+		praat_new (thee.transfer(), my name);
 	}
 END
 
@@ -5731,7 +5760,8 @@ DO
         (s1 ? s2 : s1) = me;
     }
     Melder_assert (s1 && s2);
-    praat_new (Sounds_to_DTW (s1, s2, analysisWidth, dt, band, slope), s1 -> name, U"_", s2 -> name);
+	autoDTW thee = Sounds_to_DTW (s1, s2, analysisWidth, dt, band, slope);
+    praat_new (thee.transfer(), s1 -> name, U"_", s2 -> name);
 END
 
 FORM (Sound_to_TextGrid_detectSilences, U"Sound: To TextGrid (silences)", U"Sound: To TextGrid (silences)...")
@@ -5959,9 +5989,10 @@ DO
 	}
 	LOOP {
 		iam (Sound);
-		praat_new (Sound_to_Pitch_shs (me, GET_REAL (U"Time step"), minimumPitch, fmax, ceiling,
+		autoPitch thee = Sound_to_Pitch_shs (me, GET_REAL (U"Time step"), minimumPitch, fmax, ceiling,
 		GET_INTEGER (U"Max. number of subharmonics"), GET_INTEGER (U"Max. number of candidates"),
-		GET_REAL (U"Compression factor"), GET_INTEGER (U"Number of points per octave")), my name);
+		GET_REAL (U"Compression factor"), GET_INTEGER (U"Number of points per octave"));
+		praat_new (thee.transfer(), my name);
 	}
 END
 
@@ -6038,9 +6069,9 @@ DO
 	}
 	LOOP {
 		iam (Sound);
-		praat_new (Sound_to_Pitch_SPINET (me, GET_REAL (U"Time step"), GET_REAL (U"Window length"),
-			fmin, fmax, GET_INTEGER (U"Number of filters"),
-			GET_REAL (U"Ceiling"), GET_INTEGER (U"Max. number of candidates")), my name);
+		autoPitch thee = Sound_to_Pitch_SPINET (me, GET_REAL (U"Time step"), GET_REAL (U"Window length"), fmin, fmax, 
+			GET_INTEGER (U"Number of filters"), GET_REAL (U"Ceiling"), GET_INTEGER (U"Max. number of candidates"));
+		praat_new (thee.transfer(), my name);
 	}
 END
 
@@ -6796,25 +6827,29 @@ FORM (Strings_createAsCharacters, U"Strings: Create as characters", 0)
 	SENTENCE (U"Text", U"intention")
 	OK
 DO
-	praat_new (Strings_createAsCharacters (GET_STRING (U"Text")), U"");
+	autoStrings thee = Strings_createAsCharacters (GET_STRING (U"Text"));
+	praat_new (thee.transfer(), U"");
 END
 
 FORM (Strings_createAsTokens, U"Strings: Create as tokens", 0)
 	SENTENCE (U"Text", U"There are seven tokens in this text")
 	OK
 DO
-	praat_new (Strings_createAsTokens (GET_STRING (U"Text")), U"");
+	autoStrings thee = Strings_createAsTokens (GET_STRING (U"Text"));
+	praat_new (thee.transfer(), U"");
 END
 
 DIRECT (Strings_append)
 	autoCollection set = praat_getSelectedObjects ();
-	praat_new (Strings_append (set.transfer()), U"appended");
+	autoStrings thee = Strings_append (set.transfer());
+	praat_new (thee.transfer(), U"appended");
 END
 
 DIRECT (Strings_to_Categories)
 	LOOP {
 		iam (Strings);
-		praat_new (Strings_to_Categories (me), U"");
+		autoCategories thee = Strings_to_Categories (me);
+		praat_new (thee.transfer(), U"");
 	}
 END
 
@@ -6830,8 +6865,9 @@ DO
 	long nmatches, nstringmatches;
 	LOOP {
 		iam (Strings);
-		praat_new (Strings_change (me, GET_STRING (U"Search"), GET_STRING (U"Replace"),
-		GET_INTEGER (U"Replace limit"), &nmatches, &nstringmatches, GET_INTEGER (U"Search and replace are") - 1), 0);
+		autoStrings thee = Strings_change (me, GET_STRING (U"Search"), GET_STRING (U"Replace"),
+		GET_INTEGER (U"Replace limit"), &nmatches, &nstringmatches, GET_INTEGER (U"Search and replace are") - 1);
+		praat_new (thee.transfer(), 0);
 	}
 END
 
@@ -6842,7 +6878,8 @@ FORM (Strings_extractPart, U"Strings: Extract part", U"")
 DO
 	LOOP {
 		iam (Strings);
-		praat_new (Strings_extractPart (me, GET_INTEGER (U"From index"), GET_INTEGER (U"To index")), my name, U"_part");
+		autoStrings thee = Strings_extractPart (me, GET_INTEGER (U"From index"), GET_INTEGER (U"To index"));
+		praat_new (thee.transfer(), my name, U"_part");
 	}
 END
 
@@ -6863,14 +6900,16 @@ FORM (Strings_to_Permutation, U"Strings: To Permutation", U"Strings: To Permutat
 DO
 	LOOP {
 		iam (Strings);
-		praat_new (Strings_to_Permutation (me, GET_INTEGER (U"Sort")), my name);
+		autoPermutation thee = Strings_to_Permutation (me, GET_INTEGER (U"Sort"));
+		praat_new (thee.transfer(), my name);
 	}
 END
 
 DIRECT (Strings_and_Permutation_permuteStrings)
 	Strings me = FIRST (Strings);
 	Permutation p = FIRST (Permutation);
-	praat_new (Strings_and_Permutation_permuteStrings (me, p), my name, U"_", p->name);
+	autoStrings thee = Strings_and_Permutation_permuteStrings (me, p);
+	praat_new (thee.transfer(), my name, U"_", p->name);
 END
 
 FORM (SVD_to_TableOfReal, U"SVD: To TableOfReal", U"SVD: To TableOfReal...")
@@ -6880,28 +6919,32 @@ FORM (SVD_to_TableOfReal, U"SVD: To TableOfReal", U"SVD: To TableOfReal...")
 DO
 	LOOP {
 		iam (SVD);
-		praat_new (SVD_to_TableOfReal (me, GET_INTEGER (U"First component"), GET_INTEGER (U"Last component")), my name);
+		autoTableOfReal thee = SVD_to_TableOfReal (me, GET_INTEGER (U"First component"), GET_INTEGER (U"Last component"));
+		praat_new (thee.transfer(), my name);
 	}
 END
 
 DIRECT (SVD_extractLeftSingularVectors)
 	LOOP {
 		iam (SVD);
-		praat_new (SVD_extractLeftSingularVectors (me), Thing_getName (me), U"_lsv");
+		autoTableOfReal thee = SVD_extractLeftSingularVectors (me);
+		praat_new (thee.transfer(), my name, U"_lsv");
 	}
 END
 
 DIRECT (SVD_extractRightSingularVectors)
 	LOOP {
 		iam (SVD);
-		praat_new (SVD_extractRightSingularVectors (me), Thing_getName (me), U"_rsv");
+		autoTableOfReal thee = SVD_extractRightSingularVectors (me);
+		praat_new (thee.transfer(), my name, U"_rsv");
 	}
 END
 
 DIRECT (SVD_extractSingularValues)
 	LOOP {
 		iam (SVD);
-		praat_new (SVD_extractSingularValues (me), Thing_getName (me), U"_sv");
+		autoTableOfReal thee = SVD_extractSingularValues (me);
+		praat_new (thee.transfer(), my name, U"_sv");
 	}
 END
 
@@ -7784,7 +7827,8 @@ FORM (TableOfReal_to_CCA, U"TableOfReal: To CCA", U"TableOfReal: To CCA...")
 DO
 	LOOP {
 		iam (TableOfReal);
-		praat_new (TableOfReal_to_CCA (me, GET_INTEGER (U"Dimension of dependent variate")), my name);
+		autoCCA thee = TableOfReal_to_CCA (me, GET_INTEGER (U"Dimension of dependent variate"));
+		praat_new (thee.transfer(), my name);
 	}
 END
 
diff --git a/dwtools/praat_MDS_init.cpp b/dwtools/praat_MDS_init.cpp
index cb02873..a85d707 100644
--- a/dwtools/praat_MDS_init.cpp
+++ b/dwtools/praat_MDS_init.cpp
@@ -428,8 +428,8 @@ DO
 		(c1 ? c2 : c1) = me;
 	}
 	Melder_assert (c1 && c2);
-	praat_new (Configurations_to_Procrustes (c1, c2, GET_INTEGER (U"Orthogonal transform")),
-		Thing_getName (c2), U"_to_", Thing_getName (c1));
+	autoProcrustes thee = Configurations_to_Procrustes (c1, c2, GET_INTEGER (U"Orthogonal transform"));
+	praat_new (thee.transfer(), Thing_getName (c2), U"_to_", Thing_getName (c1));
 END
 
 FORM (Configurations_to_AffineTransform_congruence, U"Configurations: To AffineTransform (congruence)", U"Configurations: To AffineTransform (congruence)...")
@@ -443,8 +443,9 @@ DO
 		(c1 ? c2 : c1) = me;
 	}
 	Melder_assert (c1 && c2);
-	praat_new (Configurations_to_AffineTransform_congruence (c1, c2, GET_INTEGER (U"Maximum number of iterations"),
-		GET_REAL (U"Tolerance")), c1 -> name, U"_", c2 -> name);
+	autoAffineTransform thee = Configurations_to_AffineTransform_congruence (c1, c2, GET_INTEGER (U"Maximum number of iterations"),
+		GET_REAL (U"Tolerance"));
+	praat_new (thee.transfer(), c1 -> name, U"_", c2 -> name);
 END
 
 DIRECT (Configuration_Weight_to_Similarity_cc)
@@ -466,7 +467,8 @@ END
 DIRECT (Configuration_and_AffineTransform_to_Configuration)
 	Configuration me = FIRST (Configuration);
 	AffineTransform at = FIRST_GENERIC (AffineTransform);
-	praat_new (Configuration_and_AffineTransform_to_Configuration (me, at), my name, U"_", at -> name);
+	autoConfiguration thee = Configuration_and_AffineTransform_to_Configuration (me, at);
+	praat_new (thee.transfer(), my name, U"_", at -> name);
 END
 
 /*************** Confusion *********************************/
diff --git a/fon/manual_Script.cpp b/fon/manual_Script.cpp
index 19af6cf..a01cd10 100644
--- a/fon/manual_Script.cpp
+++ b/fon/manual_Script.cpp
@@ -3234,13 +3234,13 @@ NORMAL (U"and on Linux")
 CODE (U"/usr/bin/praat data/hello.wav --open \"my script.praat\"")
 NORMAL (U"Note that on all three platforms, you have to supply quotes around the file name "
 	"if that file name contains one or more spaces, as here between $$my$ and $$script$ "
-	"or above between $$Program$ and $$Files$. This because the script languages of "
+	"or above between $$Program$ and $$Files$. This is because the script languages of "
 	"the Console or Terminal use spaces for separating commands and arguments.")
 
 ENTRY (U"4. Calling Praat to run a script")
 NORMAL (U"Now we are ready to discuss how to run Praat without a GUI.")
 NORMAL (U"On Windows, when you type")
-CODE (U"\"C:\\bsProgram Files\\bsPraat.exe\" \"my script.praat\"")
+CODE (U"\"C:\\bsProgram Files\\bsPraat.exe\" --run \"my script.praat\"")
 NORMAL (U"Praat will execute the script $$my script.praat$$ without showing Praat's GUI, "
 	"i.e. without showing its usual two windows. "
 	"In fact, any output that would normally go to the Info window, "
@@ -3250,9 +3250,9 @@ NORMAL (U"Praat will execute the script $$my script.praat$$ without showing Praa
 	"can run simultaneously without them noticing each other's existence; "
 	"moreover, multiple Console-instantiations of Praat can run simultaneously, each in their own Console.")
 NORMAL (U"On the Mac, you type")
-CODE (U"/Applications/Praat.app/Contents/MacOS/Praat \"my script.praat\"")
+CODE (U"/Applications/Praat.app/Contents/MacOS/Praat --run \"my script.praat\"")
 NORMAL (U"and on Linux")
-CODE (U"/usr/bin/praat data/hello.wav \"my script.praat\"")
+CODE (U"/usr/bin/praat data/hello.wav --run \"my script.praat\"")
 NORMAL (U"What happens on all platforms is that the Console or Terminal starts up Praat, "
 	"then Praat executes the script, and then Praat closes itself.")
 
@@ -3278,11 +3278,11 @@ CODE (U"Play text: second_text\\$ ")
 NORMAL (U"When you run this script from within Praat, it writes two lines to the Info window "
 	"and plays first a female voice speaking the first sentence, then a beep, and then a male voice "
 	"speaking the second sentence. To make this happen from the Windows command line instead, you type")
-CODE (U"\"C:\\bsProgram Files\\bsPraat.exe\" testCommandLineCalls.praat \"I love you\" 0.4 \"Me too\"")
+CODE (U"\"C:\\bsProgram Files\\bsPraat.exe\" --run testCommandLineCalls.praat \"I love you\" 0.4 \"Me too\"")
 NORMAL (U"In the Mac terminal, you type")
-CODE (U"/Applications/Praat.app/Contents/MacOS/Praat testCommandLineCalls.praat \"I love you\" 0.4 \"Me too\"")
+CODE (U"/Applications/Praat.app/Contents/MacOS/Praat --run testCommandLineCalls.praat \"I love you\" 0.4 \"Me too\"")
 NORMAL (U"and in the Linux terminal, you do")
-CODE (U"/usr/bin/praat data/hello.wav testCommandLineCalls.praat \"I love you\" 0.4 \"Me too\"")
+CODE (U"/usr/bin/praat --run testCommandLineCalls.praat \"I love you\" 0.4 \"Me too\"")
 NORMAL (U"Note that each argument that contains one or more spaces has to be put within quotes, "
 	"on all three platforms. As with #runScript, Praat will not present a form window, "
 	"but simply run the script with the arguments given on the command line "
@@ -3290,58 +3290,51 @@ NORMAL (U"Note that each argument that contains one or more spaces has to be put
 NORMAL (U"What then happens on all three platforms is that a console instantiation of Praat writes "
 	"the two lines to the Console window and plays the three sounds.")
 
-ENTRY (U"6. Calling Praat from Python")
+ENTRY (U"6. Calling Praat from other programs such as Python")
 NORMAL (U"You can run the above script from several programming languages, not just from a Console or Terminal. "
 	"In Python, for instance, you can do it using the same syntax as you would use in the Console or Terminal:")
 CODE (U"import os")
-CODE (U"os.system ('\"C:\\bs\\bsProgram Files\\bs\\bsPraat.exe\" testCommandLineCalls.praat \"I love you\" 0.4 \"Me too\"')")
+CODE (U"os.system ('\"C:\\bs\\bsProgram Files\\bs\\bsPraat.exe\" --run testCommandLineCalls.praat \"I love you\" 0.4 \"Me too\"')")
 NORMAL (U"Note that you have to double the backslashes!")
 NORMAL (U"A disadvantage of the $$os.system$ method is that you have to use quotes within quotes. "
 	"A somewhat cleaner approach is:")
 CODE (U"import subprocess")
-CODE (U"subprocess.call(['C:\\bs\\bsProgram Files\\bs\\bsPraat.exe', 'testCommandLineCalls.praat', 'I love you', '0.4', 'Me too'])")
+CODE (U"subprocess.call(['C:\\bs\\bsProgram Files\\bs\\bsPraat.exe', '--run', 'testCommandLineCalls.praat', 'I love you', '0.4', 'Me too'])")
 NORMAL (U"This way you specify the arguments directly, with quotes only because they are all strings, "
 	"but without having to worry about spaces. And perhaps even more importantly, this syntax "
 	"makes it easy to use variables as arguments, as in:")
 CODE (U"first_line = 'I love you'")
 CODE (U"second_line = 'me too'")
-CODE (U"subprocess.call(['C:\\bs\\bsProgram Files\\bs\\bsPraat.exe', 'testCommandLineCalls.praat', first_line, '0.4', second_line])")
-
-ENTRY (U"7. Calling Praat from other programs than Python")
+CODE (U"subprocess.call(['C:\\bs\\bsProgram Files\\bs\\bsPraat.exe', '--run', 'testCommandLineCalls.praat', first_line, '0.4', second_line])")
 NORMAL (U"Many other programs beside Python have a $$system$-like command, so that you can run a command like")
-CODE (U"system ('\"C:\\bs\\bsProgram Files\\bs\\bsPraat.exe\" testCommandLineCalls.praat \"I love you\" 0.4 \"Me too\"')")
-NORMAL (U"However, the implementation of such commands varies strongly between programs, and some programs "
-	"can make Praat think that it was started by dragging a file onto the Praat icon. In those cases, "
-	"the above $$system$ command will start up the Praat GUI and open the file rather than run it. "
-	"In such cases you could trick the $$system$ command into using a command shell, which would go like this in Windows:")
-CODE (U"system ('cmd /c \"C:\\bs\\bsProgram Files\\bs\\bsPraat.exe\" testCommandLineCalls.praat \"I love you\" 0.4 \"Me too\"')")
-NORMAL (U"or like this on the Mac or on Linux:")
-CODE (U"system ('bash \"C:\\bs\\bsProgram Files\\bs\\bsPraat.exe\" testCommandLineCalls.praat \"I love you\" 0.4 \"Me too\"')")
-NORMAL (U"It may be easier, though, to use Praat’s explicit $$--run$ option, which has been designed especially for this case:")
 CODE (U"system ('\"C:\\bs\\bsProgram Files\\bs\\bsPraat.exe\" --run testCommandLineCalls.praat \"I love you\" 0.4 \"Me too\"')")
-NORMAL (U"If you are using Praat in an automated workflow, our advice would be to always include the $$--run$ option, "
-	"even if your workflow runs correctly today without the $$--run$ option, "
-	"because the implementation of $$system$-like commands in other programs might change.")
+
+ENTRY (U"7. What happens if I specify neither --open nor --run?")
+NORMAL (U"If you specify neither $$--open$ nor $$--run$, Praat's behaviour is not guaranteed. "
+	"If you type something like")
+CODE (U"praat testCommandLineCalls.praat \"I love you\" 0.4 \"Me too\"")
+NORMAL (U"into a Console or Terminal window by hand, Praat will typically run the script. "
+	"Also, the $$--run$ option can probably be left out from the Python call above. "
+	"However, if you redirect the output of Praat to a file or pipe, you cannot typically leave out the $$--run$ option; "
+	"if you do, Praat may start its GUI and %open the file rather than run it.")
 
 ENTRY (U"8. Running Praat interactively from the command line")
 NORMAL (U"On the Mac and Linux, you have the possibility of running the program interactively from the command line:")
 CODE (U"> /usr/bin/praat -")
 NORMAL (U"You can then type in any of the fixed and dynamic commands, and commands that handle object selection, "
 	"such as #selectObject. This method also works in pipes:")
-CODE (U"> echo \"Statistics...\" | /usr/bin/praat -")
+CODE (U"> echo \"Report memory use\" | /usr/bin/praat -")
 
 ENTRY (U"9. Calling Praat from a web server")
 NORMAL (U"If you call Praat from a web server, you typically do not want to read and write its preferences and buttons files. "
 	"To achieve this, you use the ##--no-pref-files# command line option before the script name:")
 CODE (U"system ('/users/apache/praat --run --no-pref-files /user/apache/scripts/computeAnalysis.praat 1234 blibla')")
-NORMAL (U"Please note the recommended use of $$--run$ in this case.")
 
 ENTRY (U"10. All command line options")
 TAG (U"##--open")
 DEFINITION (U"Interpret the command line arguments as files to be opened in the GUI.")
 TAG (U"##--run")
-DEFINITION (U"Interpret the command line arguments as a script file name and its arguments "
-	"($$--run$ is superfluous when you use a Console or Terminal window).")
+DEFINITION (U"Interpret the command line arguments as a script file name and its arguments.")
 TAG (U"##--no-pref-files#")
 DEFINITION (U"Ignore the preferences file and the buttons file at start-up, and don't write them when quitting (see above).")
 TAG (U"##--no-plugins#")
diff --git a/fon/manual_tutorials.cpp b/fon/manual_tutorials.cpp
index f42b6f0..509bad3 100644
--- a/fon/manual_tutorials.cpp
+++ b/fon/manual_tutorials.cpp
@@ -23,9 +23,12 @@
 void manual_tutorials_init (ManPages me);
 void manual_tutorials_init (ManPages me) {
 
-MAN_BEGIN (U"What's new?", U"ppgb", 20151031)
+MAN_BEGIN (U"What's new?", U"ppgb", 20151101)
 INTRO (U"Latest changes in Praat.")
 /*LIST_ITEM (U"• Manual page about @@drawing a vowel triangle at .")*/
+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.")
 NORMAL (U"##6.0.03# (31 October 2015)")
 LIST_ITEM (U"• Corrected a bug that caused Praat to crash when the Soundrecorder window was closed.")
 LIST_ITEM (U"• Scripting: when calling Praat from the command line, added the $$--run$ option to force script execution.")
diff --git a/fon/praat_Fon.cpp b/fon/praat_Fon.cpp
index a2c094b..256af2b 100644
--- a/fon/praat_Fon.cpp
+++ b/fon/praat_Fon.cpp
@@ -5897,8 +5897,9 @@ DO
 	long numberOfMatches, numberOfStringMatches;
 	LOOP {
 		iam (Strings);
-		praat_new (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), 0);
+		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);
 	}
 END2 }
 
diff --git a/sys/Collection.cpp b/sys/Collection.cpp
index bdd8213..636378c 100644
--- a/sys/Collection.cpp
+++ b/sys/Collection.cpp
@@ -315,7 +315,7 @@ void Collection_shrinkToFit (Collection me) {
 	my item = (Any *) Melder_realloc (my item + 1, my _capacity * (int64) sizeof (Any)) - 1;
 }
 
-Any Collections_merge (Collection me, Collection thee) {
+Collection Collections_merge (Collection me, Collection thee) {
 	try {
 		if (my classInfo != thy classInfo)
 			Melder_throw (U"Objects are of different class.");
diff --git a/sys/Collection.h b/sys/Collection.h
index f8de77e..72db2bb 100644
--- a/sys/Collection.h
+++ b/sys/Collection.h
@@ -162,10 +162,10 @@ void Collection_shrinkToFit (Collection me);
 		my _capacity == max (my size, 1);
 */
 
-Any Collections_merge (Collection me, Collection thee);
+Collection Collections_merge (Collection me, Collection thee);
 /*
 	Function:
-		merge two Collections into a new one.
+		merge two Collections into a new one. The class is the same as the type of `me`.
 	Postconditions:
 		result -> size >= my size;
 		result -> size >= thy size;
diff --git a/sys/Data.cpp b/sys/Data.cpp
index a27844d..8aa1967 100644
--- a/sys/Data.cpp
+++ b/sys/Data.cpp
@@ -368,15 +368,17 @@ Data_Description Data_Description_findNumberUse (Data_Description structDescript
 
 int64 Data_Description_integer (void *address, Data_Description description) {
 	switch (description -> type) {
-		case bytewa:       return * (signed char *)    ((char *) address + description -> offset);
-		case intwa:        return * (int *)            ((char *) address + description -> offset);
-		case longwa:       return * (long *)           ((char *) address + description -> offset);
-		case ubytewa:      return * (unsigned char *)  ((char *) address + description -> offset);
-		case uintwa:       return * (unsigned int *)   ((char *) address + description -> offset);
-		case ulongwa:      return * (unsigned long *)  ((char *) address + description -> offset);
-		case boolwa:       return * (bool *)           ((char *) address + description -> offset);
-		case objectwa:     return (* (Collection *)    ((char *) address + description -> offset)) -> size;
-		case collectionwa: return (* (Collection *)    ((char *) address + description -> offset)) -> size;
+		case bytewa:           return * (signed char *)    ((char *) address + description -> offset);
+		case intwa:            return * (int *)            ((char *) address + description -> offset);
+		case longwa:           return * (long *)           ((char *) address + description -> offset);
+		case ubytewa:          return * (unsigned char *)  ((char *) address + description -> offset);
+		case uintwa:           return * (unsigned int *)   ((char *) address + description -> offset);
+		case ulongwa:          return * (unsigned long *)  ((char *) address + description -> offset);
+		case boolwa:           return * (bool *)           ((char *) address + description -> offset);
+		case objectwa:         return (* (Collection *)    ((char *) address + description -> offset)) -> size;
+		case autoobjectwa:     return (* (Collection *)    ((char *) address + description -> offset)) -> size;   // FIXME: alignment not guaranteed
+		case collectionwa:     return (* (Collection *)    ((char *) address + description -> offset)) -> size;
+		case autocollectionwa: return (* (Collection *)    ((char *) address + description -> offset)) -> size;   // FIXME: alignment not guaranteed
 		default: return 0;
 	}
 }
diff --git a/sys/Data.h b/sys/Data.h
index 0257c8a..a43f02b 100644
--- a/sys/Data.h
+++ b/sys/Data.h
@@ -345,7 +345,8 @@ extern structMelderDir Data_directoryBeingRead;
 #define objectwa  20
 #define autoobjectwa  21
 #define collectionwa  22
-#define inheritwa  23
+#define autocollectionwa  23
+#define inheritwa  24
 
 /* Recursive routines for working with struct members. */
 
diff --git a/sys/DataEditor.cpp b/sys/DataEditor.cpp
index dde89dd..de761ea 100644
--- a/sys/DataEditor.cpp
+++ b/sys/DataEditor.cpp
@@ -271,7 +271,10 @@ static void gui_button_cb_open (I, GuiButtonEvent event) {
 		MelderString_append (& name, fieldData -> history, U". ", strip_d (fieldData -> description -> name));
 		StructEditor_create (my d_root, name.string, fieldData -> address,
 			* (Data_Description *) fieldData -> description -> tagType);
-	} else if (fieldData -> description -> type == objectwa || fieldData -> description -> type == autoobjectwa || fieldData -> description -> type == collectionwa) {
+	} else if (fieldData -> description -> type == objectwa ||
+	           fieldData -> description -> type == autoobjectwa ||
+			   fieldData -> description -> type == collectionwa ||
+			   fieldData -> description -> type == autocollectionwa) {
 		MelderString_append (& name, fieldData -> history, U". ", strip_d (fieldData -> description -> name));
 		ClassEditor_create (my d_root, name.string, fieldData -> address,
 			Class_getDescription ((ClassInfo) fieldData -> description -> tagType));
@@ -474,9 +477,9 @@ static void showStructMember (
 		fieldData -> rank = 0;
 		Melder_free (fieldData -> history); fieldData -> history = Melder_dup_f (history);
 		GuiThing_show (fieldData -> button);
-	} else if (type == objectwa || type == autoobjectwa || type == collectionwa) {
-		fieldData -> address = * (Daata *) memberAddress;   /* Indirect. */
-		if (! fieldData -> address) return;   /* No button if no object. */
+	} else if (type == objectwa || type == autoobjectwa || type == collectionwa || type == autocollectionwa) {
+		fieldData -> address = * (Daata *) memberAddress;   // indirect
+		if (! fieldData -> address) return;   // no button if no object
 		fieldData -> description = memberDescription;
 		fieldData -> rank = 0;
 		Melder_free (fieldData -> history); fieldData -> history = Melder_dup_f (history);
diff --git a/sys/oo.h b/sys/oo.h
index 51d6015..03e20a7 100644
--- a/sys/oo.h
+++ b/sys/oo.h
@@ -251,6 +251,7 @@
 #define oo_OBJECT(Class,version,x)  Class x;
 #define oo_AUTO_OBJECT(Class,version,x)  auto##Class x;
 #define oo_COLLECTION(Class,x,ItemClass,version)  Class x;
+#define oo_AUTO_COLLECTION(Class,x,ItemClass,version)  auto##Class x;
 #define oo_FILE(x)  structMelderFile x;
 #define oo_DIR(x)  structMelderDir x;
 
diff --git a/sys/oo_CAN_WRITE_AS_ENCODING.h b/sys/oo_CAN_WRITE_AS_ENCODING.h
index a249522..87837a3 100644
--- a/sys/oo_CAN_WRITE_AS_ENCODING.h
+++ b/sys/oo_CAN_WRITE_AS_ENCODING.h
@@ -100,6 +100,9 @@
 #define oo_COLLECTION(Class,x,ItemClass,version)  \
 	if (our x && ! Data_canWriteAsEncoding (our x, encoding)) return false;
 
+#define oo_AUTO_COLLECTION(Class,x,ItemClass,version)  \
+	if (our x && ! Data_canWriteAsEncoding (our x.get(), encoding)) return false;
+
 #define oo_FILE(x)  \
 	if (! Melder_isEncodable (our x. path, encoding)) return false;
 
diff --git a/sys/oo_COPY.h b/sys/oo_COPY.h
index 96caef5..098db1a 100644
--- a/sys/oo_COPY.h
+++ b/sys/oo_COPY.h
@@ -101,6 +101,9 @@
 #define oo_COLLECTION(Class,x,ItemClass,version)  \
 	if (our x) thy x = Data_copy (our x);
 
+#define oo_AUTO_COLLECTION(Class,x,ItemClass,version)  \
+	if (our x) thy x = Data_copy (our x.get());
+
 #define oo_FILE(x)  \
 	MelderFile_copy (& our x, & thy x);
 
diff --git a/sys/oo_DESCRIPTION.h b/sys/oo_DESCRIPTION.h
index 401ac37..78fb3e5 100644
--- a/sys/oo_DESCRIPTION.h
+++ b/sys/oo_DESCRIPTION.h
@@ -269,6 +269,7 @@
 #define oo_OBJECT(Type,version,x)  { U"" #x, objectwa, Melder_offsetof (ooSTRUCT, x), sizeof (Type), U"" #Type, & theClassInfo_##Type },
 #define oo_AUTO_OBJECT(Type,version,x)  { U"" #x, autoobjectwa, Melder_offsetof (ooSTRUCT, x), sizeof (Type), U"" #Type, & theClassInfo_##Type },
 #define oo_COLLECTION(Type,x,ItemType,version)  { U"" #x, collectionwa, Melder_offsetof (ooSTRUCT, x), sizeof (class struct##ItemType), U"" #Type, & theClassInfo_##Type, 0, (const char32 *) & theClassInfo_##ItemType },
+#define oo_AUTO_COLLECTION(Type,x,ItemType,version)  { U"" #x, autocollectionwa, Melder_offsetof (ooSTRUCT, x), sizeof (class struct##ItemType), U"" #Type, & theClassInfo_##Type, 0, (const char32 *) & theClassInfo_##ItemType },
 #define oo_FILE(x)
 #define oo_DIR(x)
 
diff --git a/sys/oo_DESTROY.h b/sys/oo_DESTROY.h
index 905baa7..24867ab 100644
--- a/sys/oo_DESTROY.h
+++ b/sys/oo_DESTROY.h
@@ -93,6 +93,8 @@
 #define oo_COLLECTION(Class,x,ItemClass,version)  \
 	forget (our x);
 
+#define oo_AUTO_COLLECTION(Class,x,ItemClass,version)
+
 #define oo_FILE(x)
 
 #define oo_DIR(x)
diff --git a/sys/oo_EQUAL.h b/sys/oo_EQUAL.h
index a39f6c7..ba7d31b 100644
--- a/sys/oo_EQUAL.h
+++ b/sys/oo_EQUAL.h
@@ -104,6 +104,9 @@
 #define oo_COLLECTION(Class,x,ItemClass,version)  \
 	if (! our x != ! thy x || (our x && ! Data_equal (our x, thy x))) return false;
 
+#define oo_AUTO_COLLECTION(Class,x,ItemClass,version)  \
+	if (! our x != ! thy x || (our x && ! Data_equal (our x.get(), thy x.get()))) return false;
+
 #define oo_FILE(x)  \
 	if (! MelderFile_equal (& our x, & thy x)) return false;
 
diff --git a/sys/oo_READ_BINARY.h b/sys/oo_READ_BINARY.h
index 17bfc57..6401618 100644
--- a/sys/oo_READ_BINARY.h
+++ b/sys/oo_READ_BINARY.h
@@ -141,6 +141,17 @@
 		} \
 	}
 
+#define oo_AUTO_COLLECTION(Class,x,ItemClass,formatVersion)  \
+	{ \
+		int32_t n = bingeti4 (f); \
+		our x = Class##_create (); \
+		for (int32_t i = 1; i <= n; i ++) { \
+			auto##ItemClass item = (ItemClass) Thing_new (ItemClass); \
+			item.peek() -> v_readBinary (f, formatVersion); \
+			Collection_addItem (our x.get(), item.transfer()); \
+		} \
+	}
+
 #define oo_FILE(x)
 
 #define oo_DIR(x)
diff --git a/sys/oo_READ_TEXT.h b/sys/oo_READ_TEXT.h
index e71662a..324715f 100644
--- a/sys/oo_READ_TEXT.h
+++ b/sys/oo_READ_TEXT.h
@@ -162,6 +162,17 @@
 		} \
 	}
 
+#define oo_AUTO_COLLECTION(Class,x,ItemClass,formatVersion)  \
+	{ \
+		long n = texgeti4 (a_text); \
+		our x = Class##_create (); \
+		for (long i = 1; i <= n; i ++) { \
+			auto##ItemClass item = (ItemClass) Thing_new (ItemClass); \
+			item.peek() -> v_readText (a_text, formatVersion); \
+			Collection_addItem (our x.get(), item.transfer()); \
+		} \
+	}
+
 #define oo_FILE(x)
 
 #define oo_DIR(x)
diff --git a/sys/oo_WRITE_BINARY.h b/sys/oo_WRITE_BINARY.h
index e1e0ba9..c3ed12f 100644
--- a/sys/oo_WRITE_BINARY.h
+++ b/sys/oo_WRITE_BINARY.h
@@ -107,6 +107,15 @@
 		} \
 	}
 
+#define oo_AUTO_COLLECTION(Class,x,ItemClass,version)  \
+	binputi4 (our x ? our x -> size : 0, f); \
+	if (our x) { \
+		for (long i = 1; i <= our x -> size; i ++) { \
+			ItemClass data = (ItemClass) our x -> item [i]; \
+			data -> struct##ItemClass :: v_writeBinary (f); \
+		} \
+	}
+
 #define oo_FILE(x)
 
 #define oo_DIR(x)
diff --git a/sys/oo_WRITE_TEXT.h b/sys/oo_WRITE_TEXT.h
index 2cf09c7..8f695ad 100644
--- a/sys/oo_WRITE_TEXT.h
+++ b/sys/oo_WRITE_TEXT.h
@@ -150,6 +150,17 @@
 		} \
 	}
 
+#define oo_AUTO_COLLECTION(Class,x,ItemClass,version)  \
+	texputi4 (file, our x ? our x -> size : 0, U"" #x U": size", 0,0,0,0,0); \
+	if (our x) { \
+		for (long i = 1; i <= our x -> size; i ++) { \
+			ItemClass data = (ItemClass) our x -> item [i]; \
+			texputintro (file, U"" #x U" [", Melder_integer (i), U"]:", 0,0,0); \
+			data -> struct##ItemClass :: v_writeText (file); \
+			texexdent (file); \
+		} \
+	}
+
 #define oo_FILE(x)
 
 #define oo_DIR(x)
diff --git a/sys/oo_undef.h b/sys/oo_undef.h
index 79499d7..e7888ae 100644
--- a/sys/oo_undef.h
+++ b/sys/oo_undef.h
@@ -42,6 +42,7 @@
 #undef oo_OBJECT
 #undef oo_AUTO_OBJECT
 #undef oo_COLLECTION
+#undef oo_AUTO_COLLECTION
 #undef oo_FILE
 #undef oo_DIR
 
diff --git a/sys/praat.cpp b/sys/praat.cpp
index 5b7a811..0b4acf7 100644
--- a/sys/praat.cpp
+++ b/sys/praat.cpp
@@ -349,7 +349,7 @@ static void praat_new_unpackCollection (autoCollection me, const char32* myName)
 		my item [idata] = nullptr;   // disown; once the elements are autoThings, the move will handle this
 		const char32 *name = object -> name ? object -> name : myName;
 		Melder_assert (name);
-		praat_new (object.transfer(), name);   // recurse
+		praat_new (object.move(), name);   // recurse
 	}
 }
 
@@ -408,43 +408,43 @@ void praat_newWithFile (autoDaata me, MelderFile file, const char32 *myName) {
 }
 
 static MelderString thePraatNewName { 0 };
-void praat_new (Daata me) {
-	praat_newWithFile (me, nullptr, U"");
+void praat_new (autoDaata me) {
+	praat_newWithFile (me.move(), nullptr, U"");
 }
-void praat_new (Daata me, Melder_1_ARG) {
-	praat_newWithFile (me, nullptr, Melder_1_ARG_CALL);
+void praat_new (autoDaata me, Melder_1_ARG) {
+	praat_newWithFile (me.move(), nullptr, Melder_1_ARG_CALL);
 }
-void praat_new (Daata me, Melder_2_ARGS) {
+void praat_new (autoDaata me, Melder_2_ARGS) {
 	MelderString_copy (& thePraatNewName, Melder_2_ARGS_CALL);
-	praat_new (me, thePraatNewName.string);
+	praat_new (me.move(), thePraatNewName.string);
 }
-void praat_new (Daata me, Melder_3_ARGS) {
+void praat_new (autoDaata me, Melder_3_ARGS) {
 	MelderString_copy (& thePraatNewName, Melder_3_ARGS_CALL);
-	praat_new (me, thePraatNewName.string);
+	praat_new (me.move(), thePraatNewName.string);
 }
-void praat_new (Daata me, Melder_4_ARGS) {
+void praat_new (autoDaata me, Melder_4_ARGS) {
 	MelderString_copy (& thePraatNewName, Melder_4_ARGS_CALL);
-	praat_new (me, thePraatNewName.string);
+	praat_new (me.move(), thePraatNewName.string);
 }
-void praat_new (Daata me, Melder_5_ARGS) {
+void praat_new (autoDaata me, Melder_5_ARGS) {
 	MelderString_copy (& thePraatNewName, Melder_5_ARGS_CALL);
-	praat_new (me, thePraatNewName.string);
+	praat_new (me.move(), thePraatNewName.string);
 }
-void praat_new (Daata me, Melder_6_ARGS) {
+void praat_new (autoDaata me, Melder_6_ARGS) {
 	MelderString_copy (& thePraatNewName, Melder_6_ARGS_CALL);
-	praat_new (me, thePraatNewName.string);
+	praat_new (me.move(), thePraatNewName.string);
 }
-void praat_new (Daata me, Melder_7_ARGS) {
+void praat_new (autoDaata me, Melder_7_ARGS) {
 	MelderString_copy (& thePraatNewName, Melder_7_ARGS_CALL);
-	praat_new (me, thePraatNewName.string);
+	praat_new (me.move(), thePraatNewName.string);
 }
-void praat_new (Daata me, Melder_8_ARGS) {
+void praat_new (autoDaata me, Melder_8_ARGS) {
 	MelderString_copy (& thePraatNewName, Melder_8_ARGS_CALL);
-	praat_new (me, thePraatNewName.string);
+	praat_new (me.move(), thePraatNewName.string);
 }
-void praat_new (Daata me, Melder_9_ARGS) {
+void praat_new (autoDaata me, Melder_9_ARGS) {
 	MelderString_copy (& thePraatNewName, Melder_9_ARGS_CALL);
-	praat_new (me, thePraatNewName.string);
+	praat_new (me.move(), thePraatNewName.string);
 }
 
 void praat_updateSelection () {
diff --git a/sys/praat.h b/sys/praat.h
index dfe634b..a1f896b 100644
--- a/sys/praat.h
+++ b/sys/praat.h
@@ -169,16 +169,16 @@ Daata praat_onlyObject_generic (ClassInfo klas);
 praat_Object praat_onlyScreenObject ();
 char32 *praat_name (int iobject);
 void praat_write_do (UiForm dia, const char32 *extension);
-void praat_new (Daata me);
-void praat_new (Daata me, Melder_1_ARG);
-void praat_new (Daata me, Melder_2_ARGS);
-void praat_new (Daata me, Melder_3_ARGS);
-void praat_new (Daata me, Melder_4_ARGS);
-void praat_new (Daata me, Melder_5_ARGS);
-void praat_new (Daata me, Melder_6_ARGS);
-void praat_new (Daata me, Melder_7_ARGS);
-void praat_new (Daata me, Melder_8_ARGS);
-void praat_new (Daata me, Melder_9_ARGS);
+void praat_new (autoDaata me);
+void praat_new (autoDaata me, Melder_1_ARG);
+void praat_new (autoDaata me, Melder_2_ARGS);
+void praat_new (autoDaata me, Melder_3_ARGS);
+void praat_new (autoDaata me, Melder_4_ARGS);
+void praat_new (autoDaata me, Melder_5_ARGS);
+void praat_new (autoDaata me, Melder_6_ARGS);
+void praat_new (autoDaata me, Melder_7_ARGS);
+void praat_new (autoDaata me, Melder_8_ARGS);
+void praat_new (autoDaata me, Melder_9_ARGS);
 void praat_newWithFile (autoDaata me, MelderFile file, const char32 *name);
 void praat_name2 (char32 *name, ClassInfo klas1, ClassInfo klas2);
 
@@ -243,8 +243,8 @@ void praat_name2 (char32 *name, ClassInfo klas1, ClassInfo klas2);
 #define FORM(proc,name,helpTitle) \
 	static void DO_##proc (UiForm sendingForm, int narg, Stackel args, const char32 *sendingString, Interpreter interpreter, const char32 *invokingButtonTitle, bool modified, void *buttonClosure) { \
 		static UiForm dia; \
-		if (dia == NULL) { \
-			Any radio = 0; \
+		if (! dia) { \
+			Any radio = nullptr; \
 			(void) radio; \
 			dia = UiForm_create (theCurrentPraatApplication -> topShell, name, DO_##proc, buttonClosure, invokingButtonTitle, helpTitle);
 #define REAL(label,def)		UiForm_addReal (dia, label, def);
@@ -285,7 +285,7 @@ void praat_name2 (char32 *name, ClassInfo klas1, ClassInfo klas2);
 
 #define DO \
 			UiForm_do (dia, modified); \
-		} else if (sendingForm == NULL) { \
+		} else if (! sendingForm) { \
 			trace (U"args ", Melder_pointer (args)); \
 			if (args) { \
 				UiForm_call (dia, narg, args, interpreter); \
@@ -300,7 +300,7 @@ void praat_name2 (char32 *name, ClassInfo klas1, ClassInfo klas2);
 
 #define DO_ALTERNATIVE(alternative) \
 			UiForm_do (dia, modified); \
-		} else if (sendingForm == NULL) { \
+		} else if (! sendingForm) { \
 			trace (U"alternative args ", Melder_pointer (args)); \
 			try { \
 				if (args) { \
@@ -385,9 +385,9 @@ void praat_name2 (char32 *name, ClassInfo klas1, ClassInfo klas2);
 #define FORM_WRITE(proc,title,help,ext) \
 	static void DO_##proc (UiForm sendingForm, int, Stackel args, const char32 *sendingString, Interpreter, const char32 *invokingButtonTitle, bool, void *okClosure) { \
 		static UiForm dia; \
-		if (dia == NULL) \
+		if (! dia) \
 			dia = UiOutfile_create (theCurrentPraatApplication -> topShell, title, DO_##proc, okClosure, invokingButtonTitle, help); \
-		if (sendingForm == NULL && args == NULL && sendingString == NULL) { \
+		if (! sendingForm && ! args && ! sendingString) { \
 			praat_write_do (dia, ext); \
 		} else { \
 			try { \
@@ -406,9 +406,9 @@ void praat_name2 (char32 *name, ClassInfo klas1, ClassInfo klas2);
 #define FORM_WRITE2(proc,title,help,ext) \
 	static void DO_##proc (UiForm sendingForm, int, Stackel args, const char32 *sendingString, Interpreter, const char32 *invokingButtonTitle, bool, void *okClosure) { \
 		static UiForm dia; \
-		if (dia == NULL) \
+		if (! dia) \
 			dia = UiOutfile_create (theCurrentPraatApplication -> topShell, title, DO_##proc, okClosure, invokingButtonTitle, help); \
-		if (sendingForm == NULL && args == NULL && sendingString == NULL) { \
+		if (! sendingForm && ! args && ! sendingString) { \
 			praat_write_do (dia, ext); \
 		} else { \
 			try { \
diff --git a/sys/praat_statistics.cpp b/sys/praat_statistics.cpp
index 6968b01..ba1a6f8 100644
--- a/sys/praat_statistics.cpp
+++ b/sys/praat_statistics.cpp
@@ -36,10 +36,10 @@ void praat_statistics_prefs () {
 
 void praat_statistics_prefsChanged () {
 	if (! statistics.dateOfFirstSession [0]) {
-		time_t today = time (NULL);
+		time_t today = time (nullptr);
 		char32 *newLine;
 		str32cpy (statistics.dateOfFirstSession, Melder_peek8to32 (ctime (& today)));
-		newLine = str32chr (statistics.dateOfFirstSession, '\n');
+		newLine = str32chr (statistics.dateOfFirstSession, U'\n');
 		if (newLine) *newLine = '\0';
 	}
 	if (theCurrentPraatApplication -> batch)
@@ -68,7 +68,7 @@ void praat_reportIntegerProperties () {
 void praat_reportTextProperties () {
 	MelderInfo_open ();
 	MelderInfo_writeLine (U"Text properties of this edition of Praat on this computer:\n");
-	MelderInfo_writeLine (U"Locale: ", Melder_peek8to32 (setlocale (LC_ALL, NULL)));
+	MelderInfo_writeLine (U"Locale: ", Melder_peek8to32 (setlocale (LC_ALL, nullptr)));
 	MelderInfo_writeLine (U"A \"char\" is ",                                      8, U" bits.");
 	MelderInfo_writeLine (U"A \"char16_t\" is ",           sizeof (char16_t)    * 8, U" bits.");
 	MelderInfo_writeLine (U"A \"wchar_t\" is ",            sizeof (wchar_t)     * 8, U" bits.");
@@ -143,19 +143,17 @@ void praat_reportMemoryUse () {
 	MelderInfo_writeLine (U"   Things: ", Thing_getTotalNumberOfThings (),
 		U" (objects in list: ", theCurrentPraatObjects -> n, U")");
 	long numberOfMotifWidgets =
-		#if motif && (defined (_WIN32) || defined (macintosh))
-			Gui_getNumberOfMotifWidgets ();
-		#else
-			0;
-		#endif
-	if (numberOfMotifWidgets > 0) {
+	#if motif
+		Gui_getNumberOfMotifWidgets ();
 		MelderInfo_writeLine (U"   Motif widgets: ", numberOfMotifWidgets);
-	}
+	#else
+		0;
+	#endif
 	MelderInfo_writeLine (U"   Other: ",
-		Melder_bigInteger (Melder_allocationCount () - Melder_deallocationCount ()
-			- Thing_getTotalNumberOfThings () - NUM_getTotalNumberOfArrays ()
-			- (MelderString_allocationCount () - MelderString_deallocationCount ())
-			- numberOfMotifWidgets));
+		Melder_allocationCount () - Melder_deallocationCount ()
+		- Thing_getTotalNumberOfThings () - NUM_getTotalNumberOfArrays ()
+		- (MelderString_allocationCount () - MelderString_deallocationCount ())
+		- numberOfMotifWidgets);
 	MelderInfo_writeLine (
 		U"\nMemory history of this session:\n"
 		U"   Total created: ", Melder_bigInteger (Melder_allocationCount ()), U" (", Melder_bigInteger (Melder_allocationSize ()), U" bytes)");
diff --git a/sys/praat_version.h b/sys/praat_version.h
index 586df64..2275b19 100644
--- a/sys/praat_version.h
+++ b/sys/praat_version.h
@@ -1,5 +1,5 @@
-#define PRAAT_VERSION_STR 6.0.03
-#define PRAAT_VERSION_NUM 6003
+#define PRAAT_VERSION_STR 6.0.04
+#define PRAAT_VERSION_NUM 6004
 #define PRAAT_YEAR 2015
-#define PRAAT_MONTH October
-#define PRAAT_DAY 31
+#define PRAAT_MONTH November
+#define PRAAT_DAY 1

-- 
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