Index: library/tests/testsuite/arx_straux_test.cpp
===================================================================
--- library/tests/testsuite/arx_straux_test.cpp (revision 722)
+++ library/tests/testsuite/arx_straux_test.cpp (revision 1064)
@@ -6,40 +6,40 @@
 TEST ( arx_straux_test ) {
 
-	UIFile F ( "arx_straux_test.cfg" );
+    UIFile F ( "arx_straux_test.cfg" );
 
-	Setting &tests = F.getRoot() ["tests"];
-	for ( int i = 0; i < tests.getLength(); i++ ) {
-		mat A;
-		mat B;
-		ivec o1_ok;
-		UI::get ( A, tests[i], "A", UI::compulsory );
-		UI::get ( B, tests[i], "B", UI::compulsory );
-		UI::get ( o1_ok, tests[i], "o1", UI::compulsory );
+    Setting &tests = F.getRoot() ["tests"];
+    for ( int i = 0; i < tests.getLength(); i++ ) {
+        mat A;
+        mat B;
+        ivec o1_ok;
+        UI::get ( A, tests[i], "A", UI::compulsory );
+        UI::get ( B, tests[i], "B", UI::compulsory );
+        UI::get ( o1_ok, tests[i], "o1", UI::compulsory );
 
 //when updateing matrices do not forget to update CHECK_EQUAL below!!!
 
-		ldmat Ld0 ( 3 );
-		Ld0.ldform ( A, ones ( A.rows() ) );
-		ldmat Ld1 ( 3 );
-		Ld1.ldform ( A + B, ones ( A.rows() ) );
+        ldmat Ld0 ( 3 );
+        Ld0.ldform ( A, ones ( A.rows() ) );
+        ldmat Ld1 ( 3 );
+        Ld1.ldform ( A + B, ones ( A.rows() ) );
 
 
-		ivec belief = vec_1 ( 2 );        // default belief
-		int nbest = 3;           // nbest: how many regressors are returned
-		int nrep = 5;         // nrep: number of random repetions of structure estimation
-		double lambda   = 0.9;
-		int k = 2;
+        ivec belief = vec_1 ( 2 );        // default belief
+        int nbest = 3;           // nbest: how many regressors are returned
+        int nrep = 5;         // nrep: number of random repetions of structure estimation
+        double lambda   = 0.9;
+        int k = 2;
 
 //[strout, rgrsout, statistics] =
 //          straux1(L, d, nu, L0, d0, nu0, belief, nbest, max_nrep, lambda,
 //          order_k);
-		Array<str_aux> o2;
-		ivec o1 = straux1 ( Ld1, 20, Ld0, 10,  belief, nbest, nrep, lambda, k, o2 );
+        Array<str_aux> o2;
+        ivec o1 = straux1 ( Ld1, 20, Ld0, 10,  belief, nbest, nrep, lambda, k, o2 );
 
 //o1 is messed up in matlab's straux
-		sort ( o1_ok );
-		sort ( o1 );
-		CHECK_EQUAL ( o1_ok, o1 );
-	}
+        sort ( o1_ok );
+        sort ( o1 );
+        CHECK_EQUAL ( o1_ok, o1 );
+    }
 
 }
Index: library/tests/testsuite/emix_test.cpp
===================================================================
--- library/tests/testsuite/emix_test.cpp (revision 799)
+++ library/tests/testsuite/emix_test.cpp (revision 1064)
@@ -16,124 +16,124 @@
 
 TEST ( emix_test ) {
-	pdf_harness::test_config ( "emix.cfg" );
+    pdf_harness::test_config ( "emix.cfg" );
 }
 
 TEST ( emix_1_test ) {
-	RV x ( "{emixx }" );
-	RV y ( "{emixy }" );
-	RV xy = concat ( x, y );
-	vec mu0 ( "1.00054 1.0455" );
+    RV x ( "{emixx }" );
+    RV y ( "{emixy }" );
+    RV xy = concat ( x, y );
+    vec mu0 ( "1.00054 1.0455" );
 
-	enorm_ldmat_ptr E1;
-	E1->set_rv ( xy );
-	E1->set_parameters ( mu0 , mat ( "0.740142 -0.259015; -0.259015 1.0302" ) );
+    enorm_ldmat_ptr E1;
+    E1->set_rv ( xy );
+    E1->set_parameters ( mu0 , mat ( "0.740142 -0.259015; -0.259015 1.0302" ) );
 
-	enorm_ldmat_ptr E2;
-	E2->set_rv ( xy );
-	E2->set_parameters ( "-1.2 -0.1" , mat ( "1 0.4; 0.4 0.5" ) );
+    enorm_ldmat_ptr E2;
+    E2->set_rv ( xy );
+    E2->set_parameters ( "-1.2 -0.1" , mat ( "1 0.4; 0.4 0.5" ) );
 
-	epdf_array A1 ( 1 );
-	A1 ( 0 ) = E1;
+    epdf_array A1 ( 1 );
+    A1 ( 0 ) = E1;
 
-	emix M1;
-	M1.set_rv ( xy );
-	M1._Coms() = A1;
-	M1._w() = vec_1(1.0);
-	M1.validate();
+    emix M1;
+    M1.set_rv ( xy );
+    M1._Coms() = A1;
+    M1._w() = vec_1(1.0);
+    M1.validate();
 
-	// test if ARX and emix with one ARX are the same
-	epdf_ptr Mm = M1.marginal ( y );
-	epdf_ptr Am = E1->marginal ( y );
-	pdf_ptr Mc = M1.condition ( y );
-	pdf_ptr Ac = E1->condition ( y );
+    // test if ARX and emix with one ARX are the same
+    epdf_ptr Mm = M1.marginal ( y );
+    epdf_ptr Am = E1->marginal ( y );
+    pdf_ptr Mc = M1.condition ( y );
+    pdf_ptr Ac = E1->condition ( y );
 
-	mlnorm<ldmat> *wacnd = dynamic_cast<mlnorm<ldmat> *> ( Ac.get() );
-	CHECK ( wacnd );
-	if ( wacnd ) {
-		CHECK_CLOSE ( mat ( "-0.349953" ), wacnd->_A(), epsilon );
-		CHECK_CLOSE ( vec ( "1.39564" ), wacnd->_mu_const(), epsilon );
-		CHECK_CLOSE ( mat ( "0.939557" ), wacnd->_R(), epsilon );
-	}
+    mlnorm<ldmat> *wacnd = dynamic_cast<mlnorm<ldmat> *> ( Ac.get() );
+    CHECK ( wacnd );
+    if ( wacnd ) {
+        CHECK_CLOSE ( mat ( "-0.349953" ), wacnd->_A(), epsilon );
+        CHECK_CLOSE ( vec ( "1.39564" ), wacnd->_mu_const(), epsilon );
+        CHECK_CLOSE ( mat ( "0.939557" ), wacnd->_R(), epsilon );
+    }
 
-	double same = -1.46433;
-	CHECK_CLOSE ( same, Mm->evallog ( vec_1 ( 0.0 ) ), epsilon );
-	CHECK_CLOSE ( same, Am->evallog ( vec_1 ( 0.0 ) ), epsilon );
-	CHECK_CLOSE ( 0.145974, Mc->evallogcond ( vec_1 ( 0.0 ), vec_1 ( 0.0 ) ), epsilon );
-	CHECK_CLOSE ( -1.92433, Ac->evallogcond ( vec_1 ( 0.0 ), vec_1 ( 0.0 ) ), epsilon );
+    double same = -1.46433;
+    CHECK_CLOSE ( same, Mm->evallog ( vec_1 ( 0.0 ) ), epsilon );
+    CHECK_CLOSE ( same, Am->evallog ( vec_1 ( 0.0 ) ), epsilon );
+    CHECK_CLOSE ( 0.145974, Mc->evallogcond ( vec_1 ( 0.0 ), vec_1 ( 0.0 ) ), epsilon );
+    CHECK_CLOSE ( -1.92433, Ac->evallogcond ( vec_1 ( 0.0 ), vec_1 ( 0.0 ) ), epsilon );
 
-	// mixture with two components
-	epdf_array A2 ( 2 );
-	A2 ( 0 ) = E1;
-	A2 ( 1 ) = E2;
+    // mixture with two components
+    epdf_array A2 ( 2 );
+    A2 ( 0 ) = E1;
+    A2 ( 1 ) = E2;
 
-	emix M2;
-	M2.set_rv ( xy );
-	M2._Coms() = A2;
-	M2._w() = vec_2(.5,.5);
-	M2.validate();
+    emix M2;
+    M2.set_rv ( xy );
+    M2._Coms() = A2;
+    M2._w() = vec_2(.5,.5);
+    M2.validate();
 
-	// mixture normalization
-	CHECK_CLOSE ( 1.0, normcoef ( &M2, vec ( "-3 3 " ), vec ( "-3 3 " ) ), 0.1 );
+    // mixture normalization
+    CHECK_CLOSE ( 1.0, normcoef ( &M2, vec ( "-3 3 " ), vec ( "-3 3 " ) ), 0.1 );
 
-	int N = 6;
-	mat Smp = M2.sample_mat ( N );
+    int N = 6;
+    mat Smp = M2.sample_mat ( N );
 
-	vec exp_ll ( "-5.0 -2.53563 -2.62171 -5.0 -2.53563 -2.62171" );
-	vec ll = M2.evallog_mat ( Smp );
-	CHECK_CLOSE ( exp_ll, ll, 5.0 );
+    vec exp_ll ( "-5.0 -2.53563 -2.62171 -5.0 -2.53563 -2.62171" );
+    vec ll = M2.evallog_mat ( Smp );
+    CHECK_CLOSE ( exp_ll, ll, 5.0 );
 
-	check_mean ( M2, N, 0.5*mu0+0.5*vec("-1.2 -0.1"), 1.0 );
+    check_mean ( M2, N, 0.5*mu0+0.5*vec("-1.2 -0.1"), 1.0 );
 
-	mat observedR ( "0.740142 -0.259015; -0.259015 1.0302" );
-	check_covariance ( M2, N, observedR, 2.0 );
+    mat observedR ( "0.740142 -0.259015; -0.259015 1.0302" );
+    check_covariance ( M2, N, observedR, 2.0 );
 
-	epdf_ptr Mg = M2.marginal ( y );
-	CHECK ( Mg.get() );
-	pdf_ptr Cn = M2.condition ( x );
-	CHECK ( Cn.get() );
+    epdf_ptr Mg = M2.marginal ( y );
+    CHECK ( Mg.get() );
+    pdf_ptr Cn = M2.condition ( x );
+    CHECK ( Cn.get() );
 
-	// marginal mean
-	CHECK_CLOSE ( vec ( "0.5" ), Mg->mean(), 0.1 );
+    // marginal mean
+    CHECK_CLOSE ( vec ( "0.5" ), Mg->mean(), 0.1 );
 }
 
 
 static void check_mean ( emix &distrib_obj, int nsamples, const vec &mean, double tolerance ) {
-	int tc = 0;
-	Array<vec> actual ( CurrentContext::max_trial_count );
-	do {
-		mat smp = distrib_obj.sample_mat ( nsamples );
-		vec emu = sum ( smp, 2 ) / nsamples;
-		actual ( tc ) = emu;
-		++tc;
-	} while ( ( tc < CurrentContext::max_trial_count ) &&
-	          !UnitTest::AreClose ( mean, actual ( tc - 1 ), tolerance ) );
-	if ( ( tc == CurrentContext::max_trial_count ) &&
-	        ( !UnitTest::AreClose ( mean, actual ( CurrentContext::max_trial_count - 1 ), tolerance ) ) ) {
-		UnitTest::MemoryOutStream stream;
-		UnitTest::TestDetails details ( *UnitTest::CurrentTest::Details(), __LINE__ );
-		stream << "Expected " << mean << " +/- " << tolerance << " but was " << actual;
+    int tc = 0;
+    Array<vec> actual ( CurrentContext::max_trial_count );
+    do {
+        mat smp = distrib_obj.sample_mat ( nsamples );
+        vec emu = sum ( smp, 2 ) / nsamples;
+        actual ( tc ) = emu;
+        ++tc;
+    } while ( ( tc < CurrentContext::max_trial_count ) &&
+              !UnitTest::AreClose ( mean, actual ( tc - 1 ), tolerance ) );
+    if ( ( tc == CurrentContext::max_trial_count ) &&
+            ( !UnitTest::AreClose ( mean, actual ( CurrentContext::max_trial_count - 1 ), tolerance ) ) ) {
+        UnitTest::MemoryOutStream stream;
+        UnitTest::TestDetails details ( *UnitTest::CurrentTest::Details(), __LINE__ );
+        stream << "Expected " << mean << " +/- " << tolerance << " but was " << actual;
 
-		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
-	}
+        UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
+    }
 }
 
 static void check_covariance ( emix &distrib_obj, int nsamples, const mat &R, double tolerance ) {
-	int tc = 0;
-	Array<mat> actual ( CurrentContext::max_trial_count );
-	do {
-		mat smp = distrib_obj.sample_mat ( nsamples );
-		vec emu = sum ( smp, 2 ) / nsamples;
-		mat er = ( smp * smp.T() ) / nsamples - outer_product ( emu, emu );
-		actual ( tc ) = er;
-		++tc;
-	} while ( ( tc < CurrentContext::max_trial_count ) &&
-	          !UnitTest::AreClose ( R, actual ( tc - 1 ), tolerance ) );
-	if ( ( tc == CurrentContext::max_trial_count ) &&
-	        ( !UnitTest::AreClose ( R, actual ( CurrentContext::max_trial_count - 1 ), tolerance ) ) ) {
-		UnitTest::MemoryOutStream stream;
-		UnitTest::TestDetails details ( *UnitTest::CurrentTest::Details(), __LINE__ );
-		stream << "Expected " << R << " +/- " << tolerance << " but was " << actual;
+    int tc = 0;
+    Array<mat> actual ( CurrentContext::max_trial_count );
+    do {
+        mat smp = distrib_obj.sample_mat ( nsamples );
+        vec emu = sum ( smp, 2 ) / nsamples;
+        mat er = ( smp * smp.T() ) / nsamples - outer_product ( emu, emu );
+        actual ( tc ) = er;
+        ++tc;
+    } while ( ( tc < CurrentContext::max_trial_count ) &&
+              !UnitTest::AreClose ( R, actual ( tc - 1 ), tolerance ) );
+    if ( ( tc == CurrentContext::max_trial_count ) &&
+            ( !UnitTest::AreClose ( R, actual ( CurrentContext::max_trial_count - 1 ), tolerance ) ) ) {
+        UnitTest::MemoryOutStream stream;
+        UnitTest::TestDetails details ( *UnitTest::CurrentTest::Details(), __LINE__ );
+        stream << "Expected " << R << " +/- " << tolerance << " but was " << actual;
 
-		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
-	}
+        UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
+    }
 }
Index: library/tests/testsuite/epdf_test.cpp
===================================================================
--- library/tests/testsuite/epdf_test.cpp (revision 1033)
+++ library/tests/testsuite/epdf_test.cpp (revision 1064)
@@ -9,86 +9,86 @@
 
 TEST ( egamma_test ) {
-	epdf_harness::test_config ( "egamma.cfg" );
+    epdf_harness::test_config ( "egamma.cfg" );
 }
 
 TEST ( enorm_test ) {
-	epdf_harness::test_config ( "enorm.cfg" );	
+    epdf_harness::test_config ( "enorm.cfg" );
 }
 
 TEST ( estudent_test ) {
-	epdf_harness::test_config ( "estudent.cfg" );
+    epdf_harness::test_config ( "estudent.cfg" );
 }
 
 // not using epdf_harness because eprod isn't configurable (yet?)
 TEST ( eprod_test ) {
-	
-	RV a ( "{eprod_a }", "1" );
-	RV b ( "{eprod_b }", "2" );
-	
-	egamma_ptr g0;
-	g0->set_parameters ( vec ( "2" ), vec ( "2" ) );
-	g0->validate();
-	g0->set_rv ( a );
-	
-	egamma_ptr g1;
-	g1->set_parameters ( vec ( "100000 10000" ), vec ( "10000 1000" ) );
-	g1->validate();
-	g1->set_rv ( b );
-	
-	Array<shared_ptr<epdf> > coms ( 2 );
-	coms ( 0 ) = g0;
-	coms ( 1 ) = g1;
-	
-	eprod p;
-	// set_parameters doesn't say so, but it actually requires
-	// pointers in the array to outlast the eprod instance...
-	p.set_parameters ( coms );
-	p.validate();
-	
-	CHECK_EQUAL ( vec ( "1 10 10" ), p.mean() );
-	CHECK_EQUAL ( vec ( "0 0 0" ), p.variance() );
+
+    RV a ( "{eprod_a }", "1" );
+    RV b ( "{eprod_b }", "2" );
+
+    egamma_ptr g0;
+    g0->set_parameters ( vec ( "2" ), vec ( "2" ) );
+    g0->validate();
+    g0->set_rv ( a );
+
+    egamma_ptr g1;
+    g1->set_parameters ( vec ( "100000 10000" ), vec ( "10000 1000" ) );
+    g1->validate();
+    g1->set_rv ( b );
+
+    Array<shared_ptr<epdf> > coms ( 2 );
+    coms ( 0 ) = g0;
+    coms ( 1 ) = g1;
+
+    eprod p;
+    // set_parameters doesn't say so, but it actually requires
+    // pointers in the array to outlast the eprod instance...
+    p.set_parameters ( coms );
+    p.validate();
+
+    CHECK_EQUAL ( vec ( "1 10 10" ), p.mean() );
+    CHECK_EQUAL ( vec ( "0 0 0" ), p.variance() );
 }
 
 TEST ( ewishart_test ) {
-	mat wM = "1.1 0.9; 0.9 1.0";
-	eWishartCh eW;
-	eW.set_parameters ( wM / 100, 100 );
-	eW.validate();
-	mat mea = zeros ( 2, 2 );
-	mat Ch;
-	for ( int i = 0; i < 100; i++ ) {
-		Ch = eW.sample_mat();
-		mea += Ch.T() * Ch;
-	}
-	
-	mat actual = mea / 100;
-	CHECK_CLOSE ( wM, actual, 0.1 );
+    mat wM = "1.1 0.9; 0.9 1.0";
+    eWishartCh eW;
+    eW.set_parameters ( wM / 100, 100 );
+    eW.validate();
+    mat mea = zeros ( 2, 2 );
+    mat Ch;
+    for ( int i = 0; i < 100; i++ ) {
+        Ch = eW.sample_mat();
+        mea += Ch.T() * Ch;
+    }
+
+    mat actual = mea / 100;
+    CHECK_CLOSE ( wM, actual, 0.1 );
 }
 
 TEST ( rwiwishart_test ) {
-	mat wM = "1.0 0.9; 0.9 1.0";
-	rwiWishartCh rwW;
-	rwW.set_parameters ( 2, 0.1, "1 1", 0.9 );
-	rwW.validate();
-	mat mea = zeros ( 2, 2 );
-	mat wMch = chol ( wM );
-	mat Ch ( 2, 2 );
-	
-	for ( int i = 0; i < 100; i++ ) {
-		vec tmp = rwW.samplecond ( vec ( wMch._data(), 4 ) );
-		copy_vector ( 4, tmp._data(), Ch._data() );
-		mea += Ch.T() * Ch;
-		
-	}
-	
-	mat observed ( "0.99464 0.885458; 0.885458 1.01853" );
-	mat actual = mea / 100;
-	CHECK_CLOSE ( observed, actual, 0.1 );
+    mat wM = "1.0 0.9; 0.9 1.0";
+    rwiWishartCh rwW;
+    rwW.set_parameters ( 2, 0.1, "1 1", 0.9 );
+    rwW.validate();
+    mat mea = zeros ( 2, 2 );
+    mat wMch = chol ( wM );
+    mat Ch ( 2, 2 );
+
+    for ( int i = 0; i < 100; i++ ) {
+        vec tmp = rwW.samplecond ( vec ( wMch._data(), 4 ) );
+        copy_vector ( 4, tmp._data(), Ch._data() );
+        mea += Ch.T() * Ch;
+
+    }
+
+    mat observed ( "0.99464 0.885458; 0.885458 1.01853" );
+    mat actual = mea / 100;
+    CHECK_CLOSE ( observed, actual, 0.1 );
 }
 
 TEST ( dirich_test ) {
-	epdf_harness::test_config ( "edirich.cfg" );
+    epdf_harness::test_config ( "edirich.cfg" );
 }
 TEST ( ebeta_test ) {
-	epdf_harness::test_config ( "ebeta.cfg" );
+    epdf_harness::test_config ( "ebeta.cfg" );
 }
Index: library/tests/testsuite/randun_test.cpp
===================================================================
--- library/tests/testsuite/randun_test.cpp (revision 738)
+++ library/tests/testsuite/randun_test.cpp (revision 1064)
@@ -6,12 +6,12 @@
 
 TEST ( randun_test ) {
-	// matlab output obtained by
-	// >>clear all
-	// >>randun(10);
-	vec matlab_out = " 0.695964974209650, 0.083321541586575, 0.385149445564090, 0.206731595660901, 0.537928272754852, 0.960480190795139, 0.790566693893898, 0.054424274738144, 0.708785523990535, 0.558301708920999";
+    // matlab output obtained by
+    // >>clear all
+    // >>randun(10);
+    vec matlab_out = " 0.695964974209650, 0.083321541586575, 0.385149445564090, 0.206731595660901, 0.537928272754852, 0.960480190795139, 0.790566693893898, 0.054424274738144, 0.708785523990535, 0.558301708920999";
 
-	//ASSUMING randun was not used yet!
-	vec x = randun ( 10 );
-	CHECK_CLOSE ( matlab_out, x, 1e-6 );
+    //ASSUMING randun was not used yet!
+    vec x = randun ( 10 );
+    CHECK_CLOSE ( matlab_out, x, 1e-6 );
 }
 
Index: library/tests/testsuite/rv_test.cpp
===================================================================
--- library/tests/testsuite/rv_test.cpp (revision 1008)
+++ library/tests/testsuite/rv_test.cpp (revision 1064)
@@ -7,152 +7,152 @@
 
 TEST ( rv_test ) {
-	RV::clear_all();
+    RV::clear_all();
 
-	RV a = RV ( "{a_in_test_rv }", "3" );
-	CHECK ( a.equal ( a ) );
-	CHECK_EQUAL ( 1, a.length() );
-	CHECK_EQUAL ( 3, a.size ( 0 ) );
-	CHECK_EQUAL ( std::string ( "a_in_test_rv" ), a.name ( 0 ) );
+    RV a = RV ( "{a_in_test_rv }", "3" );
+    CHECK ( a.equal ( a ) );
+    CHECK_EQUAL ( 1, a.length() );
+    CHECK_EQUAL ( 3, a.size ( 0 ) );
+    CHECK_EQUAL ( std::string ( "a_in_test_rv" ), a.name ( 0 ) );
 
-	RV b = RV ( "{b_in_test_rv }", "2" );
-	CHECK ( !b.equal ( a ) );
-	CHECK_EQUAL ( 0, b.mint() );
+    RV b = RV ( "{b_in_test_rv }", "2" );
+    CHECK ( !b.equal ( a ) );
+    CHECK_EQUAL ( 0, b.mint() );
 
-	RV c = RV ( "{c_in_test_rv }" );
-	CHECK_EQUAL ( 1, c.length() );
-	CHECK_EQUAL ( 1, c.size ( 0 ) );
+    RV c = RV ( "{c_in_test_rv }" );
+    CHECK_EQUAL ( 1, c.length() );
+    CHECK_EQUAL ( 1, c.size ( 0 ) );
 
-	RV trv = RV ( "{e_in_test_rv f_in_test_rv }", "1 2", "3 4" );
-	CHECK_EQUAL ( 2, trv.length() );
-	CHECK_EQUAL ( 3, trv.mint() );
+    RV trv = RV ( "{e_in_test_rv f_in_test_rv }", "1 2", "3 4" );
+    CHECK_EQUAL ( 2, trv.length() );
+    CHECK_EQUAL ( 3, trv.mint() );
 
-	// add a and b
-	RV ab = a;
-	bool added = ab.add ( b );
-	CHECK ( added );
-	CHECK_EQUAL ( 2, ab.length() );
-	CHECK_EQUAL ( 3, ab.size ( 0 ) );
-	CHECK_EQUAL ( std::string ( "a_in_test_rv" ), ab.name ( 0 ) );
-	CHECK_EQUAL ( 2, ab.size ( 1 ) );
-	CHECK_EQUAL ( std::string ( "b_in_test_rv" ), ab.name ( 1 ) );
+    // add a and b
+    RV ab = a;
+    bool added = ab.add ( b );
+    CHECK ( added );
+    CHECK_EQUAL ( 2, ab.length() );
+    CHECK_EQUAL ( 3, ab.size ( 0 ) );
+    CHECK_EQUAL ( std::string ( "a_in_test_rv" ), ab.name ( 0 ) );
+    CHECK_EQUAL ( 2, ab.size ( 1 ) );
+    CHECK_EQUAL ( std::string ( "b_in_test_rv" ), ab.name ( 1 ) );
 
-	std::stringstream abss;
-	abss << ab;
-	CHECK_EQUAL ( std::string ( "[a_in_test_rv(3)_{0}; b_in_test_rv(2)_{0}; ]" ), abss.str() );
+    std::stringstream abss;
+    abss << ab;
+    CHECK_EQUAL ( std::string ( "[a_in_test_rv(3)_{0}; b_in_test_rv(2)_{0}; ]" ), abss.str() );
 
-	// concat a, b and c
-	RV abc = concat ( ab, c );
-	CHECK_EQUAL ( 3, abc.length() );
-	std::stringstream abcss;
-	abcss << abc;
-	CHECK_EQUAL ( std::string ( "[a_in_test_rv(3)_{0}; b_in_test_rv(2)_{0}; c_in_test_rv(1)_{0}; ]" ), abcss.str() );
+    // concat a, b and c
+    RV abc = concat ( ab, c );
+    CHECK_EQUAL ( 3, abc.length() );
+    std::stringstream abcss;
+    abcss << abc;
+    CHECK_EQUAL ( std::string ( "[a_in_test_rv(3)_{0}; b_in_test_rv(2)_{0}; c_in_test_rv(1)_{0}; ]" ), abcss.str() );
 
-	// structure of a, b, c
-	str s = abc.tostr();
-	int exp_ids[] = { 1, 1, 1, 2, 2, 3 };
-	int exp_sz = sizeof ( exp_ids ) / sizeof ( exp_ids[0] );
-	CHECK_EQUAL ( exp_sz, s.ids.size() );
-	CHECK_EQUAL ( exp_sz, s.times.size() );
-	for ( int i = 0; i < exp_sz; ++i ) {
-		CHECK_EQUAL ( exp_ids[i], s.ids ( i ) );
-		CHECK_EQUAL ( 0, s.times ( i ) );
-	}
+    // structure of a, b, c
+    str s = abc.tostr();
+    int exp_ids[] = { 1, 1, 1, 2, 2, 3 };
+    int exp_sz = sizeof ( exp_ids ) / sizeof ( exp_ids[0] );
+    CHECK_EQUAL ( exp_sz, s.ids.size() );
+    CHECK_EQUAL ( exp_sz, s.times.size() );
+    for ( int i = 0; i < exp_sz; ++i ) {
+        CHECK_EQUAL ( exp_ids[i], s.ids ( i ) );
+        CHECK_EQUAL ( 0, s.times ( i ) );
+    }
 
-	RV slice = abc ( 1, 2 );
-	CHECK_EQUAL ( 1, slice.length() );
-	CHECK_EQUAL ( 3, slice.size ( 0 ) );
-	CHECK_EQUAL ( std::string ( "a_in_test_rv" ), slice.name ( 0 ) );
+    RV slice = abc ( 1, 2 );
+    CHECK_EQUAL ( 1, slice.length() );
+    CHECK_EQUAL ( 3, slice.size ( 0 ) );
+    CHECK_EQUAL ( std::string ( "a_in_test_rv" ), slice.name ( 0 ) );
 
-	// find a in abc
-	ivec f = a.findself ( abc );
-	CHECK_EQUAL ( 1, f.length() );
-	CHECK_EQUAL ( 0, f ( 0 ) );
+    // find a in abc
+    ivec f = a.findself ( abc );
+    CHECK_EQUAL ( 1, f.length() );
+    CHECK_EQUAL ( 0, f ( 0 ) );
 
-	// find abc in a
-	f = abc.findself ( a );
-	int exp_indices[] = { 0, -1, -1 };
-	CHECK_EQUAL ( 3, f.length() );
-	for ( unsigned i = 0;
-	        i < sizeof ( exp_indices ) / sizeof ( exp_indices[0] );
-	        ++i ) {
-		CHECK_EQUAL ( exp_indices[i], f ( i ) );
-	}
+    // find abc in a
+    f = abc.findself ( a );
+    int exp_indices[] = { 0, -1, -1 };
+    CHECK_EQUAL ( 3, f.length() );
+    for ( unsigned i = 0;
+            i < sizeof ( exp_indices ) / sizeof ( exp_indices[0] );
+            ++i ) {
+        CHECK_EQUAL ( exp_indices[i], f ( i ) );
+    }
 
-	// subtract b from abc
-	RV ac = abc.subt ( b );
-	std::stringstream acss;
-	acss << ac;
-	CHECK_EQUAL ( std::string ( "[a_in_test_rv(3)_{0}; c_in_test_rv(1)_{0}; ]" ), acss.str() );
+    // subtract b from abc
+    RV ac = abc.subt ( b );
+    std::stringstream acss;
+    acss << ac;
+    CHECK_EQUAL ( std::string ( "[a_in_test_rv(3)_{0}; c_in_test_rv(1)_{0}; ]" ), acss.str() );
 
-	// data index of ac in abc
-	ivec di = ac.dataind ( abc );
-	int exp_di[] = { 0, 1, 2, 5 };
-	exp_sz = sizeof ( exp_di ) / sizeof ( exp_di[0] );
-	CHECK_EQUAL ( exp_sz, di.size() );
-	for ( int i = 0; i < exp_sz; ++i ) {
-		CHECK_EQUAL ( exp_di[i], di ( i ) );
-	}
+    // data index of ac in abc
+    ivec di = ac.dataind ( abc );
+    int exp_di[] = { 0, 1, 2, 5 };
+    exp_sz = sizeof ( exp_di ) / sizeof ( exp_di[0] );
+    CHECK_EQUAL ( exp_sz, di.size() );
+    for ( int i = 0; i < exp_sz; ++i ) {
+        CHECK_EQUAL ( exp_di[i], di ( i ) );
+    }
 
-	// subselect
-	RV bc = abc ( ivec ( "1 2" ) );
-	std::stringstream bcss;
-	bcss << bc;
-	CHECK_EQUAL ( std::string ( "[b_in_test_rv(2)_{0}; c_in_test_rv(1)_{0}; ]" ), bcss.str() );
+    // subselect
+    RV bc = abc ( ivec ( "1 2" ) );
+    std::stringstream bcss;
+    bcss << bc;
+    CHECK_EQUAL ( std::string ( "[b_in_test_rv(2)_{0}; c_in_test_rv(1)_{0}; ]" ), bcss.str() );
 
 #if 0
-	// actually doesn't select, just reorders the variables -
-	// wonder if that's correct...
-	bc = abc ( 1, 2 );
-	bcss << bc;
-	CHECK_EQUAL ( std::string ( "2(2)=b_in_test_rv_{0}; 3(1)=c_in_test_rv_{0}; " ), bcss.str() );
+    // actually doesn't select, just reorders the variables -
+    // wonder if that's correct...
+    bc = abc ( 1, 2 );
+    bcss << bc;
+    CHECK_EQUAL ( std::string ( "2(2)=b_in_test_rv_{0}; 3(1)=c_in_test_rv_{0}; " ), bcss.str() );
 #endif
 
-	// Copy indices between ba and ab
-	RV ba = b;
-	ba.add ( a );
+    // Copy indices between ba and ab
+    RV ba = b;
+    ba.add ( a );
 
-	ivec ai;
-	ivec bi;
-	ba.dataind ( ac, ai, bi );
+    ivec ai;
+    ivec bi;
+    ba.dataind ( ac, ai, bi );
 
-	int exp_ai[] = { 2, 3, 4 };
-	exp_sz = sizeof ( exp_ai ) / sizeof ( exp_ai[0] );
-	CHECK_EQUAL ( exp_sz, ai.size() );
-	for ( unsigned i = 0;
-	        i < sizeof ( exp_ai ) / sizeof ( exp_ai[0] );
-	        ++i ) {
-		CHECK_EQUAL ( exp_ai[i], ai ( i ) );
-	}
+    int exp_ai[] = { 2, 3, 4 };
+    exp_sz = sizeof ( exp_ai ) / sizeof ( exp_ai[0] );
+    CHECK_EQUAL ( exp_sz, ai.size() );
+    for ( unsigned i = 0;
+            i < sizeof ( exp_ai ) / sizeof ( exp_ai[0] );
+            ++i ) {
+        CHECK_EQUAL ( exp_ai[i], ai ( i ) );
+    }
 
-	int exp_bi[] = { 0, 1, 2 };
-	exp_sz = sizeof ( exp_bi ) / sizeof ( exp_bi[0] );
-	CHECK_EQUAL ( exp_sz, bi.size() );
-	for ( unsigned i = 0;
-	        i < sizeof ( exp_bi ) / sizeof ( exp_bi[0] );
-	        ++i ) {
-		CHECK_EQUAL ( exp_bi[i], bi ( i ) );
-	}
+    int exp_bi[] = { 0, 1, 2 };
+    exp_sz = sizeof ( exp_bi ) / sizeof ( exp_bi[0] );
+    CHECK_EQUAL ( exp_sz, bi.size() );
+    for ( unsigned i = 0;
+            i < sizeof ( exp_bi ) / sizeof ( exp_bi[0] );
+            ++i ) {
+        CHECK_EQUAL ( exp_bi[i], bi ( i ) );
+    }
 
-	// check uniqueness
-	RV join = a;
-	join.add ( b );
-	RV tmp = a;
-	tmp.t_plus ( 1 );
-	join.add ( tmp );
-	tmp = b;
-	tmp.t_plus ( -1 );
-	join.add ( tmp );
+    // check uniqueness
+    RV join = a;
+    join.add ( b );
+    RV tmp = a;
+    tmp.t_plus ( 1 );
+    join.add ( tmp );
+    tmp = b;
+    tmp.t_plus ( -1 );
+    join.add ( tmp );
 
-	CHECK_EQUAL ( unique ( join._ids() ), vec_2 ( a.id ( 0 ), b.id ( 0 ) ) ); // find only ids of a and b
-	CHECK_EQUAL ( unique_complement ( join._ids(), vec_1 ( a.id ( 0 ) ) ), vec_1 ( b.id ( 0 ) ) ); // complemnet of a in previous is b
+    CHECK_EQUAL ( unique ( join._ids() ), vec_2 ( a.id ( 0 ), b.id ( 0 ) ) ); // find only ids of a and b
+    CHECK_EQUAL ( unique_complement ( join._ids(), vec_1 ( a.id ( 0 ) ) ), vec_1 ( b.id ( 0 ) ) ); // complemnet of a in previous is b
 
-	//test if unique names work
-	RV uniq1 ( "y", 1 );
-	RV uniq2 ( "y", 1 );
+    //test if unique names work
+    RV uniq1 ( "y", 1 );
+    RV uniq2 ( "y", 1 );
 
-	CHECK_EQUAL ( uniq1.id ( 0 ), uniq2.id ( 0 ) );
+    CHECK_EQUAL ( uniq1.id ( 0 ), uniq2.id ( 0 ) );
 
-	// check scalarname
-	CHECK_EQUAL ( "a_in_test_rv_2", abc.scalarname ( 2 ) );
-	CHECK_EQUAL ( "b_in_test_rv_0", abc.scalarname ( 3 ) );
+    // check scalarname
+    CHECK_EQUAL ( "a_in_test_rv_2", abc.scalarname ( 2 ) );
+    CHECK_EQUAL ( "b_in_test_rv_0", abc.scalarname ( 3 ) );
 }
Index: library/tests/testsuite/datasource_test.cpp
===================================================================
--- library/tests/testsuite/datasource_test.cpp (revision 907)
+++ library/tests/testsuite/datasource_test.cpp (revision 1064)
@@ -7,69 +7,69 @@
 
 TEST ( EpdfDS_test ) {
-	UIFile uif ( "epdfds.cfg" );
-	shared_ptr<EpdfDS> ds = UI::build<EpdfDS> ( uif, "ds" );
+    UIFile uif ( "epdfds.cfg" );
+    shared_ptr<EpdfDS> ds = UI::build<EpdfDS> ( uif, "ds" );
 
-	vec mean = zeros ( 2 );
-	vec dt = zeros ( 2 );
-	for ( int i = 0; i < 100; i++ ) {
-		ds->step();
-		ds->getdata ( dt );
-		mean += dt;
-	}
-	CHECK_CLOSE_EX ( vec_2 ( 1.0, 2.0 ) , mean / 100, 1e-2 );
+    vec mean = zeros ( 2 );
+    vec dt = zeros ( 2 );
+    for ( int i = 0; i < 100; i++ ) {
+        ds->step();
+        ds->getdata ( dt );
+        mean += dt;
+    }
+    CHECK_CLOSE_EX ( vec_2 ( 1.0, 2.0 ) , mean / 100, 1e-2 );
 }
 
 TEST ( PdfDS_test ) {
-	UIFile uif ( "pdfds.cfg" );
+    UIFile uif ( "pdfds.cfg" );
 
-	shared_ptr<PdfDS> ds = UI::build<PdfDS> ( uif, "ds", UI::compulsory );
+    shared_ptr<PdfDS> ds = UI::build<PdfDS> ( uif, "ds", UI::compulsory );
 
-	vec dt = zeros ( 2 );
-	vec ut = "1.0";
-	ds->write ( ut );
-	for ( int i = 0; i < 100; i++ ) {
-		ds->step();
-	}
-	ds->getdata ( dt );
-	CHECK_CLOSE ( -0.2 , dt ( 0 ), 1e-4 );
+    vec dt = zeros ( 2 );
+    vec ut = "1.0";
+    ds->write ( ut );
+    for ( int i = 0; i < 100; i++ ) {
+        ds->step();
+    }
+    ds->getdata ( dt );
+    CHECK_CLOSE ( -0.2 , dt ( 0 ), 1e-4 );
 
-	ut = "2.0";
-	ds->write ( ut );
-	for ( int i = 0; i < 100; i++ ) {
-		ds->step();
-	}
-	ds->getdata ( dt );
-	CHECK_CLOSE ( -0.4 , dt ( 0 ), 1e-4 );
+    ut = "2.0";
+    ds->write ( ut );
+    for ( int i = 0; i < 100; i++ ) {
+        ds->step();
+    }
+    ds->getdata ( dt );
+    CHECK_CLOSE ( -0.4 , dt ( 0 ), 1e-4 );
 }
 
 TEST ( StateDS_test ) {
-	RV y ( "y", 1 );
-	RV u ( "u", 1 );
-	RV x ( "x", 2 );
+    RV y ( "y", 1 );
+    RV u ( "u", 1 );
+    RV x ( "x", 2 );
 
-	shared_ptr<mlnorm<fsqmat> > IM = new mlnorm<fsqmat>;
-	IM->set_parameters ( mat ( "1 2 0.5; 0 1 0.3" ), zeros ( 2 ), fsqmat ( 1e-10*eye ( 2 ) ) );
-	IM->set_rv ( x );
-	IM->set_rvc ( concat ( x.copy_t ( -1 ), u ) );
-	IM->validate();
+    shared_ptr<mlnorm<fsqmat> > IM = new mlnorm<fsqmat>;
+    IM->set_parameters ( mat ( "1 2 0.5; 0 1 0.3" ), zeros ( 2 ), fsqmat ( 1e-10*eye ( 2 ) ) );
+    IM->set_rv ( x );
+    IM->set_rvc ( concat ( x.copy_t ( -1 ), u ) );
+    IM->validate();
 
-	shared_ptr<mlnorm<fsqmat> > OM = new mlnorm<fsqmat>;
-	OM->set_parameters ( mat ( "1 0" ), zeros ( 1 ), fsqmat ( 1e-10*eye ( 1 ) ) );
-	OM->set_rv ( y );
-	OM->set_rvc ( x );
-	OM->validate();
+    shared_ptr<mlnorm<fsqmat> > OM = new mlnorm<fsqmat>;
+    OM->set_parameters ( mat ( "1 0" ), zeros ( 1 ), fsqmat ( 1e-10*eye ( 1 ) ) );
+    OM->set_rv ( y );
+    OM->set_rvc ( x );
+    OM->validate();
 
-	StateDS sds;
-	sds.set_parameters ( IM, OM );
-	sds.validate();
+    StateDS sds;
+    sds.set_parameters ( IM, OM );
+    sds.validate();
 
-	for ( int t = 1; t < 10; t++ ) {
-		sds.write ( vec_1 ( double ( t ) ) );
-		// TODO ZDE TO SPADNE
-		sds.step();
-	}
+    for ( int t = 1; t < 10; t++ ) {
+        sds.write ( vec_1 ( double ( t ) ) );
+        // TODO ZDE TO SPADNE
+        sds.step();
+    }
 
-	vec dt;
-	sds.getdata ( dt );
-	CHECK_CLOSE ( vec ( "94.5, 94.5, 13.5, 9" ), dt, 1e-2 );
+    vec dt;
+    sds.getdata ( dt );
+    CHECK_CLOSE ( vec ( "94.5, 94.5, 13.5, 9" ), dt, 1e-2 );
 }
Index: library/tests/testsuite/testsuite.cpp
===================================================================
--- library/tests/testsuite/testsuite.cpp (revision 865)
+++ library/tests/testsuite/testsuite.cpp (revision 1064)
@@ -10,19 +10,19 @@
 
 int main ( int argc, char const *argv[] ) {
-	if ( argc > 1 ) {
-		if ( !strcmp ( argv[1], "print" ) )
-		{
-			print_test_list();
-			return 0;
-		}
-		else
-			pick_selected_tests ( argc, argv );
-	} else {
-		cout << endl << "TESTSUITE - a program covering all BDM unit tests." << endl << endl
-		     << argv[0] << " ....................................... run all unit tests" << endl
-		     << argv[0] << " particular_test_1 particular_test_2 ... run selected unit tests" << endl
-		     << argv[0] << " print ................................. print all the implemented unit tests" << endl;
-	}
+    if ( argc > 1 ) {
+        if ( !strcmp ( argv[1], "print" ) )
+        {
+            print_test_list();
+            return 0;
+        }
+        else
+            pick_selected_tests ( argc, argv );
+    } else {
+        cout << endl << "TESTSUITE - a program covering all BDM unit tests." << endl << endl
+             << argv[0] << " ....................................... run all unit tests" << endl
+             << argv[0] << " particular_test_1 particular_test_2 ... run selected unit tests" << endl
+             << argv[0] << " print ................................. print all the implemented unit tests" << endl;
+    }
 
-	return run_selected_tests();
+    return run_selected_tests();
 }
Index: library/tests/testsuite/egiw_test.cpp
===================================================================
--- library/tests/testsuite/egiw_test.cpp (revision 722)
+++ library/tests/testsuite/egiw_test.cpp (revision 1064)
@@ -13,45 +13,45 @@
 
 TEST ( egiw_test ) {
-	epdf_harness::test_config ( "egiw.cfg" );
+    epdf_harness::test_config ( "egiw.cfg" );
 }
 
 TEST ( egiw_1_2_test ) {
-	// Setup model
-	double mu = 1.1; //unit step parametr
-	double b = 3.0; // sequence of <1 -1 1 -1...>
-	double s = 0.1;
+    // Setup model
+    double mu = 1.1; //unit step parametr
+    double b = 3.0; // sequence of <1 -1 1 -1...>
+    double s = 0.1;
 
 
-	// TEST 1x1 EGIW
-	mat V ( 3, 3 );
-	V ( 0, 0 ) = pow ( mu, 2 ) + pow ( b, 2 ) + s;
-	V ( 1, 0 ) = mu;
-	V ( 2, 0 ) = b;
+    // TEST 1x1 EGIW
+    mat V ( 3, 3 );
+    V ( 0, 0 ) = pow ( mu, 2 ) + pow ( b, 2 ) + s;
+    V ( 1, 0 ) = mu;
+    V ( 2, 0 ) = b;
 
-	V ( 0, 1 ) = V ( 1, 0 );
-	V ( 1, 1 ) = 1.0;
-	V ( 2, 1 ) = 0.0;
+    V ( 0, 1 ) = V ( 1, 0 );
+    V ( 1, 1 ) = 1.0;
+    V ( 2, 1 ) = 0.0;
 
-	V ( 0, 2 ) = V ( 2, 0 );
-	V ( 1, 2 ) = V ( 2, 1 );
-	V ( 2, 2 ) = 1.0;
+    V ( 0, 2 ) = V ( 2, 0 );
+    V ( 1, 2 ) = V ( 2, 1 );
+    V ( 2, 2 ) = 1.0;
 
-	double nu = 20;
+    double nu = 20;
 
-	egiw E ( 1, nu * V, nu );
-	CHECK_CLOSE ( vec ( "1.1 3.0 0.142857" ), E.mean(), epsilon );
-	CHECK_CLOSE ( 7.36731, E.lognc(), epsilon );
+    egiw E ( 1, nu * V, nu );
+    CHECK_CLOSE ( vec ( "1.1 3.0 0.142857" ), E.mean(), epsilon );
+    CHECK_CLOSE ( 7.36731, E.lognc(), epsilon );
 
-	int n = 100;
-	rectangular_support Sup;
-	Sup.set_parameters ( "{[-2.,4.], [1.,5.], [0.,2.]} ", n*ones_i ( E.dimension() ) );
+    int n = 100;
+    rectangular_support Sup;
+    Sup.set_parameters ( "{[-2.,4.], [1.,5.], [0.,2.]} ", n*ones_i ( E.dimension() ) );
 
-	double summ = exp ( E.evallog ( Sup.first_vec() ) );
-	// sum all likelihood at all points of support
-	for ( int k = 1; k < Sup.points(); k++ ) { // ALL b
-		summ += exp ( E.evallog ( Sup.next_vec() ) );
-	}
+    double summ = exp ( E.evallog ( Sup.first_vec() ) );
+    // sum all likelihood at all points of support
+    for ( int k = 1; k < Sup.points(); k++ ) { // ALL b
+        summ += exp ( E.evallog ( Sup.next_vec() ) );
+    }
 
-	CHECK_CLOSE ( 1.0, summ*prod ( Sup._steps() ), 0.01 );
+    CHECK_CLOSE ( 1.0, summ*prod ( Sup._steps() ), 0.01 );
 }
 
Index: library/tests/testsuite/shared_ptr_test.cpp
===================================================================
--- library/tests/testsuite/shared_ptr_test.cpp (revision 722)
+++ library/tests/testsuite/shared_ptr_test.cpp (revision 1064)
@@ -6,16 +6,16 @@
 class Foo {
 private:
-	int x;
+    int x;
 
 public:
-	Foo ( int x ) : x ( x ) { }
+    Foo ( int x ) : x ( x ) { }
 
-	int get_x() const {
-		return x;
-	}
+    int get_x() const {
+        return x;
+    }
 
-	void set_x ( int nx ) {
-		x = nx;
-	}
+    void set_x ( int nx ) {
+        x = nx;
+    }
 };
 
@@ -25,65 +25,65 @@
 
 TEST ( shared_ptr_test ) {
-	TFooVector v;
+    TFooVector v;
 
-	bdm::shared_ptr<Foo> zero;
-	CHECK_EQUAL ( 0l, zero.use_count() );
-	bdm::shared_ptr<Foo> z2 ( zero );
-	CHECK_EQUAL ( 0l, z2.use_count() );
+    bdm::shared_ptr<Foo> zero;
+    CHECK_EQUAL ( 0l, zero.use_count() );
+    bdm::shared_ptr<Foo> z2 ( zero );
+    CHECK_EQUAL ( 0l, z2.use_count() );
 
-	bdm::shared_ptr<Foo> one ( new Foo ( 1 ) );
-	v.push_back ( one );
-	CHECK ( !one.unique() );
+    bdm::shared_ptr<Foo> one ( new Foo ( 1 ) );
+    v.push_back ( one );
+    CHECK ( !one.unique() );
 
-	v.push_back ( one );
-	v.push_back ( bdm::shared_ptr<Foo> ( new Foo ( 2 ) ) );
-	CHECK_EQUAL ( static_cast<TFooVector::size_type> ( 3 ), v.size() );
+    v.push_back ( one );
+    v.push_back ( bdm::shared_ptr<Foo> ( new Foo ( 2 ) ) );
+    CHECK_EQUAL ( static_cast<TFooVector::size_type> ( 3 ), v.size() );
 
-	CHECK ( v[0] == v[1] );
-	CHECK ( v[1] != v[2] );
+    CHECK ( v[0] == v[1] );
+    CHECK ( v[1] != v[2] );
 
-	Foo c ( * ( v[0] ) );
-	CHECK_EQUAL ( 1, c.get_x() );
+    Foo c ( * ( v[0] ) );
+    CHECK_EQUAL ( 1, c.get_x() );
 
-	Foo *p = v[1].get();
-	CHECK_EQUAL ( 1, p->get_x() );
-	p->set_x ( 12 );
-	CHECK_EQUAL ( 12, one->get_x() );
+    Foo *p = v[1].get();
+    CHECK_EQUAL ( 1, p->get_x() );
+    p->set_x ( 12 );
+    CHECK_EQUAL ( 12, one->get_x() );
 
-	CHECK ( v[2].unique() );
-	CHECK_EQUAL ( 2, v[2]->get_x() );
+    CHECK ( v[2].unique() );
+    CHECK_EQUAL ( 2, v[2]->get_x() );
 }
 
 TEST ( shared_ptr_const_test ) {
-	TConstFooVector v;
+    TConstFooVector v;
 
-	bdm::shared_ptr<const Foo> zero;
-	CHECK_EQUAL ( 0l, zero.use_count() );
-	bdm::shared_ptr<const Foo> z2 ( zero );
-	CHECK_EQUAL ( 0l, z2.use_count() );
+    bdm::shared_ptr<const Foo> zero;
+    CHECK_EQUAL ( 0l, zero.use_count() );
+    bdm::shared_ptr<const Foo> z2 ( zero );
+    CHECK_EQUAL ( 0l, z2.use_count() );
 
-	bdm::shared_ptr<const Foo> one ( new Foo ( 1 ) );
-	v.push_back ( one );
-	CHECK ( !one.unique() );
+    bdm::shared_ptr<const Foo> one ( new Foo ( 1 ) );
+    v.push_back ( one );
+    CHECK ( !one.unique() );
 
-	v.push_back ( one );
-	v.push_back ( bdm::shared_ptr<const Foo> ( new Foo ( 2 ) ) );
-	CHECK_EQUAL ( static_cast<TConstFooVector::size_type> ( 3 ), v.size() );
+    v.push_back ( one );
+    v.push_back ( bdm::shared_ptr<const Foo> ( new Foo ( 2 ) ) );
+    CHECK_EQUAL ( static_cast<TConstFooVector::size_type> ( 3 ), v.size() );
 
-	CHECK ( v[0] == v[1] );
-	CHECK ( v[1] != v[2] );
+    CHECK ( v[0] == v[1] );
+    CHECK ( v[1] != v[2] );
 
-	Foo c ( * ( v[0] ) );
-	CHECK_EQUAL ( 1, c.get_x() );
+    Foo c ( * ( v[0] ) );
+    CHECK_EQUAL ( 1, c.get_x() );
 
-	const Foo *p = v[1].get();
-	CHECK_EQUAL ( 1, p->get_x() );
+    const Foo *p = v[1].get();
+    CHECK_EQUAL ( 1, p->get_x() );
 
-	CHECK ( v[2].unique() );
-	CHECK_EQUAL ( 2, v[2]->get_x() );
+    CHECK ( v[2].unique() );
+    CHECK_EQUAL ( 2, v[2]->get_x() );
 
-	bdm::shared_ptr<Foo> non_const;
-	bdm::shared_ptr<const Foo> another ( non_const );
-	CHECK ( !non_const.unique() );
+    bdm::shared_ptr<Foo> non_const;
+    bdm::shared_ptr<const Foo> another ( non_const );
+    CHECK ( !non_const.unique() );
 }
 
@@ -91,11 +91,11 @@
 #ifndef NDEBUG
 TEST ( shared_ptr_error_test ) {
-	bdm::shared_ptr<Foo> empty;
-	try {
-		Foo x ( *empty );
-		CHECK ( false );
-	} catch ( std::runtime_error &exc ) {
-		CHECK ( exc.what() );
-	}
+    bdm::shared_ptr<Foo> empty;
+    try {
+        Foo x ( *empty );
+        CHECK ( false );
+    } catch ( std::runtime_error &exc ) {
+        CHECK ( exc.what() );
+    }
 }
 #endif
Index: library/tests/testsuite/square_mat_test.cpp
===================================================================
--- library/tests/testsuite/square_mat_test.cpp (revision 998)
+++ library/tests/testsuite/square_mat_test.cpp (revision 1064)
@@ -16,105 +16,105 @@
 template<typename TMatrix>
 void test_square_matrix ( double epsilon ) {
-	int sz = 3;
-	mat A0 = randu ( sz, sz );
-	mat A = A0 * A0.T();
+    int sz = 3;
+    mat A0 = randu ( sz, sz );
+    mat A = A0 * A0.T();
 
-	// ----------- SIZES ---------
-	TMatrix sq_mat ( A );
-	CHECK_EQUAL ( sz, sq_mat.rows() );
-	CHECK_EQUAL ( sz, sq_mat.cols() );
+    // ----------- SIZES ---------
+    TMatrix sq_mat ( A );
+    CHECK_EQUAL ( sz, sq_mat.rows() );
+    CHECK_EQUAL ( sz, sq_mat.cols() );
 
-	// ----------- FULL MAT ---------
-	mat res = sq_mat.to_mat();
-	CHECK_CLOSE ( A, res, epsilon );
+    // ----------- FULL MAT ---------
+    mat res = sq_mat.to_mat();
+    CHECK_CLOSE ( A, res, epsilon );
 
-	// ----------- OUTER PRODUCT UPDATE ---------
-	vec v = randu ( sz );
-	double w = randu();
-	TMatrix sq_mat2 = sq_mat;
-	sq_mat2.opupdt ( v, w );
+    // ----------- OUTER PRODUCT UPDATE ---------
+    vec v = randu ( sz );
+    double w = randu();
+    TMatrix sq_mat2 = sq_mat;
+    sq_mat2.opupdt ( v, w );
 
-	res = A + w * outer_product ( v, v );
-	CHECK_CLOSE ( res, sq_mat2.to_mat(), epsilon );
+    res = A + w * outer_product ( v, v );
+    CHECK_CLOSE ( res, sq_mat2.to_mat(), epsilon );
 
-	// ----------- INVERSION ---------
-	TMatrix invmat ( sz );
-	sq_mat.inv ( invmat );
-	mat invA = inv ( A );
-	CHECK_CLOSE ( invA, invmat.to_mat(), epsilon );
+    // ----------- INVERSION ---------
+    TMatrix invmat ( sz );
+    sq_mat.inv ( invmat );
+    mat invA = inv ( A );
+    CHECK_CLOSE ( invA, invmat.to_mat(), epsilon );
 
-	// ----------- DETERMINANT ---------
-	double d = det ( A );
-	CHECK_CLOSE ( log ( d ), sq_mat.logdet(), epsilon );
+    // ----------- DETERMINANT ---------
+    double d = det ( A );
+    CHECK_CLOSE ( log ( d ), sq_mat.logdet(), epsilon );
 
-	// ----------- QUADRATIC FORM ---------
-	double q = sq_mat.qform ( ones ( sz ) );
-	CHECK_CLOSE ( sumsum ( A ), q, epsilon );
+    // ----------- QUADRATIC FORM ---------
+    double q = sq_mat.qform ( ones ( sz ) );
+    CHECK_CLOSE ( sumsum ( A ), q, epsilon );
 
-	q = sq_mat.qform ( v );
-	double r = ( A * v ) * v;
-	CHECK_CLOSE ( r, q, epsilon );
+    q = sq_mat.qform ( v );
+    double r = ( A * v ) * v;
+    CHECK_CLOSE ( r, q, epsilon );
 
-	q = sq_mat.invqform ( v );
-	r = ( invA * v ) * v;
-	CHECK_CLOSE ( r, q, epsilon );
+    q = sq_mat.invqform ( v );
+    r = ( invA * v ) * v;
+    CHECK_CLOSE ( r, q, epsilon );
 
-	sq_mat2 = sq_mat;
-	sq_mat2.clear();
-	CHECK_EQUAL ( 0, sq_mat2.qform ( ones ( sz ) ) );
+    sq_mat2 = sq_mat;
+    sq_mat2.clear();
+    CHECK_EQUAL ( 0, sq_mat2.qform ( ones ( sz ) ) );
 
-	// ----------- + operator ---------	
-	TMatrix twice = sq_mat;
-	twice += sq_mat;
-	res = 2 * A;
-	CHECK_CLOSE ( res, twice.to_mat(), epsilon );
+    // ----------- + operator ---------
+    TMatrix twice = sq_mat;
+    twice += sq_mat;
+    res = 2 * A;
+    CHECK_CLOSE ( res, twice.to_mat(), epsilon );
 
-	// ----------- * operator ---------	
-	twice = sq_mat;
-	twice *= 2;
-	CHECK_CLOSE ( res, twice.to_mat(), epsilon );
+    // ----------- * operator ---------
+    twice = sq_mat;
+    twice *= 2;
+    CHECK_CLOSE ( res, twice.to_mat(), epsilon );
 
-	// ----------- MULTIPLICATION ---------	
-	sq_mat2 = sq_mat;
-	mat B = randu ( sz, sz );
-	sq_mat2.mult_sym ( B );
-	res = ( B * A ) * B.T();
-	CHECK_CLOSE ( res, sq_mat2.to_mat(), epsilon );
+    // ----------- MULTIPLICATION ---------
+    sq_mat2 = sq_mat;
+    mat B = randu ( sz, sz );
+    sq_mat2.mult_sym ( B );
+    res = ( B * A ) * B.T();
+    CHECK_CLOSE ( res, sq_mat2.to_mat(), epsilon );
 
-	mat C = randu ( sz, sz - 1 );
-	TMatrix CAC ( sz - 1 );
-	sq_mat.mult_sym_t ( C, CAC );
-	res = ( C.T() * A ) * C;
-	CHECK_CLOSE ( res, CAC.to_mat(), epsilon );
+    mat C = randu ( sz, sz - 1 );
+    TMatrix CAC ( sz - 1 );
+    sq_mat.mult_sym_t ( C, CAC );
+    res = ( C.T() * A ) * C;
+    CHECK_CLOSE ( res, CAC.to_mat(), epsilon );
 
-	sq_mat2 = sq_mat;
-	sq_mat2.mult_sym_t ( B );
-	res = ( B.T() * A ) * B;
-	CHECK_CLOSE ( res, sq_mat2.to_mat(), epsilon );
-	
-	// ----------- PERMUTATION ---------	
-	mat M1 = randu (sz,sz);
-	mat M = M1*M1.T();
-	vec perm_v_rand = randu(sz);
-	ivec perm_v_ids  = sort_index(perm_v_rand);
-	
-	mat Mperm_c=M.get_cols(perm_v_ids);
-	mat Mperm=Mperm_c.get_rows(perm_v_ids);
-	
-	TMatrix T(M);
-	TMatrix Tperm(T,perm_v_ids);
+    sq_mat2 = sq_mat;
+    sq_mat2.mult_sym_t ( B );
+    res = ( B.T() * A ) * B;
+    CHECK_CLOSE ( res, sq_mat2.to_mat(), epsilon );
 
-	CHECK_CLOSE(Tperm.to_mat(), Mperm, epsilon);
+    // ----------- PERMUTATION ---------
+    mat M1 = randu (sz,sz);
+    mat M = M1*M1.T();
+    vec perm_v_rand = randu(sz);
+    ivec perm_v_ids  = sort_index(perm_v_rand);
+
+    mat Mperm_c=M.get_cols(perm_v_ids);
+    mat Mperm=Mperm_c.get_rows(perm_v_ids);
+
+    TMatrix T(M);
+    TMatrix Tperm(T,perm_v_ids);
+
+    CHECK_CLOSE(Tperm.to_mat(), Mperm, epsilon);
 }
 
 TEST ( ldmat_test ) {
-	test_square_matrix<ldmat> ( epsilon );
+    test_square_matrix<ldmat> ( epsilon );
 }
 
 TEST ( fsqmat_test ) {
-	test_square_matrix<fsqmat> ( epsilon );
+    test_square_matrix<fsqmat> ( epsilon );
 }
 
 TEST ( chmat_test ) {
-	test_square_matrix<chmat> ( epsilon );
+    test_square_matrix<chmat> ( epsilon );
 }
Index: library/tests/testsuite/rectangular_support_test.cpp
===================================================================
--- library/tests/testsuite/rectangular_support_test.cpp (revision 722)
+++ library/tests/testsuite/rectangular_support_test.cpp (revision 1064)
@@ -8,18 +8,18 @@
 
 TEST ( rectangular_support_test ) {
-	rectangular_support rs;
-	CHECK_EQUAL ( rs.first_vec(), vec ( 0 ) );
+    rectangular_support rs;
+    CHECK_EQUAL ( rs.first_vec(), vec ( 0 ) );
 
-	Array<vec> range ( 2 );
-	range ( 0 ) = vec ( "0 1" );
-	range ( 1 ) = vec ( "-1 1" );
-	ivec gridsize ( 2 );
-	gridsize ( 0 ) = 10;
-	gridsize ( 1 ) = 20;
-	rs.set_parameters ( range, gridsize );
-	CHECK_EQUAL ( 200, rs.points() );
+    Array<vec> range ( 2 );
+    range ( 0 ) = vec ( "0 1" );
+    range ( 1 ) = vec ( "-1 1" );
+    ivec gridsize ( 2 );
+    gridsize ( 0 ) = 10;
+    gridsize ( 1 ) = 20;
+    rs.set_parameters ( range, gridsize );
+    CHECK_EQUAL ( 200, rs.points() );
 
-	vec v = rs.get_vec ( ivec ( "1 2" ) );
-	CHECK_CLOSE ( vec ( "0.15 -0.75" ), v, epsilon );
+    vec v = rs.get_vec ( ivec ( "1 2" ) );
+    CHECK_CLOSE ( vec ( "0.15 -0.75" ), v, epsilon );
 }
 
Index: library/tests/testsuite/pdf_test.cpp
===================================================================
--- library/tests/testsuite/pdf_test.cpp (revision 721)
+++ library/tests/testsuite/pdf_test.cpp (revision 1064)
@@ -10,16 +10,16 @@
 
 TEST ( mgamma_test ) {
-	pdf_harness::test_config ( "mgamma.cfg" );
+    pdf_harness::test_config ( "mgamma.cfg" );
 }
 
 TEST ( mlnorm_test ) {
-	pdf_harness::test_config ( "mlnorm.cfg" );
+    pdf_harness::test_config ( "mlnorm.cfg" );
 }
 
 TEST ( mprod_test ) {
-	pdf_harness::test_config ( "mprod.cfg" );
+    pdf_harness::test_config ( "mprod.cfg" );
 }
 
 TEST ( mmix_test ) {
-	pdf_harness::test_config ( "mmix.cfg" );
+    pdf_harness::test_config ( "mmix.cfg" );
 }
Index: library/tests/testsuite/logger_test.cpp
===================================================================
--- library/tests/testsuite/logger_test.cpp (revision 916)
+++ library/tests/testsuite/logger_test.cpp (revision 1064)
@@ -15,77 +15,77 @@
 
 int get_file_size ( const char *fname ) {
-	struct stat st;
-	if ( stat ( fname, &st ) ) {
-		std::string msg = "can't stat ";
-		msg += fname;
-		throw std::runtime_error ( msg );
-	}
+    struct stat st;
+    if ( stat ( fname, &st ) ) {
+        std::string msg = "can't stat ";
+        msg += fname;
+        throw std::runtime_error ( msg );
+    }
 
-	int sz = static_cast<int> ( st.st_size );
-	if ( sz != st.st_size ) {
-		std::string msg = fname;
-		msg += " too big";
-		throw std::runtime_error ( msg );
-	}
+    int sz = static_cast<int> ( st.st_size );
+    if ( sz != st.st_size ) {
+        std::string msg = fname;
+        msg += " too big";
+        throw std::runtime_error ( msg );
+    }
 
-	return sz;
+    return sz;
 }
 
 class log_tester : public root
 {
-	LOG_LEVEL(log_tester,logr,logth,logpol);
+    LOG_LEVEL(log_tester,logr,logth,logpol);
 public:
-	RV th, r;
-	int pol, i;
+    RV th, r;
+    int pol, i;
 
-	log_tester() {
-		th = RV ( "{alog blog }" );
-		r = RV ( "{r }", "2" );
-		pol = 11;
+    log_tester() {
+        th = RV ( "{alog blog }" );
+        r = RV ( "{r }", "2" );
+        pol = 11;
 
-		log_level[logr] = true;
-		log_level[logth] = true;
-		log_level[logpol] = true;
-	}
+        log_level[logr] = true;
+        log_level[logth] = true;
+        log_level[logpol] = true;
+    }
 
-	void log_register( logger &L, const string prefix ) {
-		root::log_register( L, prefix );
-		L.add_vector( log_level, logr, r, prefix );
-		L.add_vector( log_level, logth, th, prefix );
-		L.add_setting( log_level, logpol, prefix, 0 );
-		L.add_setting( log_level, logpol, prefix, 1 );
-	}
+    void log_register( logger &L, const string prefix ) {
+        root::log_register( L, prefix );
+        L.add_vector( log_level, logr, r, prefix );
+        L.add_vector( log_level, logth, th, prefix );
+        L.add_setting( log_level, logpol, prefix, 0 );
+        L.add_setting( log_level, logpol, prefix, 1 );
+    }
 
-	void log_write() const {
-		root::log_write();
-		log_level.store( logr, vec_2 ( ( double ) i, ( double ) ( i + 1 ) ) );
-		log_level.store( logth, vec_2 ( ( double ) ( 100 - i ), ( double ) ( i - 50 ) ) );
-		log_level.store( logpol, pol, 0 );
-		log_level.store( logpol, pol^2, 1 );
-	}
+    void log_write() const {
+        root::log_write();
+        log_level.store( logr, vec_2 ( ( double ) i, ( double ) ( i + 1 ) ) );
+        log_level.store( logth, vec_2 ( ( double ) ( 100 - i ), ( double ) ( i - 50 ) ) );
+        log_level.store( logpol, pol, 0 );
+        log_level.store( logpol, pol^2, 1 );
+    }
 
 };
 
 TEST ( memlog_test ) {
-	string ls ( "memlog_test" );
-	remove_all ( ls.c_str() );
+    string ls ( "memlog_test" );
+    remove_all ( ls.c_str() );
 
-	memlog logger ( 100, ls );
+    memlog logger ( 100, ls );
 
 
-	log_tester tester;
-	tester.log_register( logger, "memlog" );
-	
-	logger.init();
+    log_tester tester;
+    tester.log_register( logger, "memlog" );
 
-	for ( tester.i = 0; tester.i < 10; tester.i++ ) {
-		tester.log_write();
-		logger.step();
-	}
+    logger.init();
 
-	logger.finalize();
+    for ( tester.i = 0; tester.i < 10; tester.i++ ) {
+        tester.log_write();
+        logger.step();
+    }
 
-	CHECK_EQUAL ( get_file_size ( "logger_test.matrix" ), get_file_size ( ( ls + ".it" ).c_str() ) );
-	CHECK_EQUAL ( get_file_size ( ( ls + ".cfg.check" ).c_str() ), get_file_size ( ( ls + ".cfg" ).c_str() ) );
+    logger.finalize();
+
+    CHECK_EQUAL ( get_file_size ( "logger_test.matrix" ), get_file_size ( ( ls + ".it" ).c_str() ) );
+    CHECK_EQUAL ( get_file_size ( ( ls + ".cfg.check" ).c_str() ), get_file_size ( ( ls + ".cfg" ).c_str() ) );
 }
 
@@ -93,25 +93,25 @@
 
 
-	string ls ( "exp" );
-	remove_all ( ls.c_str() );
-	makedir ( ls, false );
-	remove_all ( "dirfilelog_files" );
+    string ls ( "exp" );
+    remove_all ( ls.c_str() );
+    makedir ( ls, false );
+    remove_all ( "dirfilelog_files" );
 
-	dirfilelog logger ( "dirfilelog_files", 10 );
+    dirfilelog logger ( "dirfilelog_files", 10 );
 
-	log_tester tester;
-	tester.log_register( logger, "dirfilelog" );	
+    log_tester tester;
+    tester.log_register( logger, "dirfilelog" );
 
-	logger.init();
+    logger.init();
 
-	for ( tester.i = 0; tester.i < 150; tester.i++ ) {
-		tester.log_write();
-		logger.step();
-	}
+    for ( tester.i = 0; tester.i < 150; tester.i++ ) {
+        tester.log_write();
+        logger.step();
+    }
 
-	logger.finalize();
+    logger.finalize();
 
-	std::string expected ( load_test_file ( "logger_test_dirfile_format.matrix" ) );
-	std::string actual ( load_test_file ( "dirfilelog_files/format" ) );
-	CHECK_EQUAL ( expected, actual );
+    std::string expected ( load_test_file ( "logger_test_dirfile_format.matrix" ) );
+    std::string actual ( load_test_file ( "dirfilelog_files/format" ) );
+    CHECK_EQUAL ( expected, actual );
 }
Index: library/tests/testsuite/merger_test.cpp
===================================================================
--- library/tests/testsuite/merger_test.cpp (revision 722)
+++ library/tests/testsuite/merger_test.cpp (revision 1064)
@@ -9,161 +9,161 @@
 
 TEST ( merger_base_test ) {
-	RV x ( "{xmerger }", "1" );
+    RV x ( "{xmerger }", "1" );
 
-	RV z ( x );
+    RV z ( x );
 
-	enorm_fsqmat_ptr f1;
-	f1->set_rv ( x );
-	enorm_fsqmat_ptr f2;
-	f2->set_rv ( x );
+    enorm_fsqmat_ptr f1;
+    f1->set_rv ( x );
+    enorm_fsqmat_ptr f2;
+    f2->set_rv ( x );
 
-	f1->set_parameters ( "-5", mat ( "2" ) );
-	f2->set_parameters ( "5", mat ( "10" ) );
+    f1->set_parameters ( "-5", mat ( "2" ) );
+    f2->set_parameters ( "5", mat ( "10" ) );
 
-	pdf_array A ( 2 );
-	A ( 0 ) = f1;
-	A ( 1 ) = f2;
+    pdf_array A ( 2 );
+    A ( 0 ) = f1;
+    A ( 1 ) = f2;
 
-	int Npoints = 100;
-	mat x_grid ( 1, Npoints );
-	x_grid.set_row ( 0, linspace ( -10.0, 10.0 ) );
+    int Npoints = 100;
+    mat x_grid ( 1, Npoints );
+    x_grid.set_row ( 0, linspace ( -10.0, 10.0 ) );
 
-	vec l_f1 = f1->evallog_mat ( x_grid );
-	vec l_f2 = f2->evallog_mat ( x_grid );
-	mat lW ( 2, Npoints );
-	lW.set_row ( 0, l_f1 );
-	lW.set_row ( 1, l_f2 );
+    vec l_f1 = f1->evallog_mat ( x_grid );
+    vec l_f2 = f2->evallog_mat ( x_grid );
+    mat lW ( 2, Npoints );
+    lW.set_row ( 0, l_f1 );
+    lW.set_row ( 1, l_f2 );
 
-	merger_base M ( A );
-	enorm<fsqmat> g0;
-	g0.set_rv ( x );
-	g0.set_parameters ( vec ( "0.0" ), mat ( "100.0" ) );
+    merger_base M ( A );
+    enorm<fsqmat> g0;
+    g0.set_rv ( x );
+    g0.set_parameters ( vec ( "0.0" ), mat ( "100.0" ) );
 
-	M.set_method ( LOGNORMAL, 1.2 );
-	M.set_support ( g0, 200 );
-	M.merge ();
+    M.set_method ( LOGNORMAL, 1.2 );
+    M.set_support ( g0, 200 );
+    M.merge ();
 
-	vec m2 = M.merge_points ( lW );
+    vec m2 = M.merge_points ( lW );
 
-	vec exp_f1 ( "-7.51551 -7.02066 "
-	             "-6.54622 -6.09219 "
-	             "-5.65856 -5.24534 "
-	             "-4.85252 -4.48011 -4.1281 "
-	             "-3.7965 -3.48531 -3.19452 "
-	             "-2.92414 -2.67417 -2.4446 -2.23544 -2.04668 "
-	             "-1.87833 -1.73039 -1.60285 -1.49572 -1.40899 -1.34267 -1.29676 -1.27125 -1.26615 -1.28145 -1.31717 -1.37328 -1.4498 -1.54673 -1.66407 -1.80181 -1.95996 "
-	             "-2.13851 -2.33747 -2.55683 -2.79661 "
-	             "-3.05678 -3.33737 -3.63836 -3.95975 "
-	             "-4.30155 -4.66376 "
-	             "-5.04638 -5.4494 -5.87282 "
-	             "-6.31665 -6.78089 "
-	             "-7.26554 -7.77059 "
-	             "-8.29604 -8.84191 "
-	             "-9.40818 -9.99485 "
-	             "-10.6019 "
-	             "-11.2294 -11.8773 "
-	             "-12.5456 "
-	             "-13.2343 -13.9434 "
-	             "-14.6729 "
-	             "-15.4229 "
-	             "-16.1932 -16.9839 "
-	             "-17.7951 "
-	             "-18.6266 "
-	             "-19.4786 "
-	             "-20.3509 "
-	             "-21.2437 "
-	             "-22.1569 "
-	             "-23.0905 "
-	             "-24.0444 "
-	             "-25.0188 "
-	             "-26.0136 "
-	             "-27.0288 "
-	             "-28.0644 "
-	             "-29.1205 "
-	             "-30.1969 "
-	             "-31.2937 "
-	             "-32.4109 "
-	             "-33.5486 "
-	             "-34.7066 "
-	             "-35.8851 "
-	             "-37.0839 "
-	             "-38.3032 "
-	             "-39.5429 "
-	             "-40.8029 "
-	             "-42.0834 "
-	             "-43.3843 "
-	             "-44.7056 "
-	             "-46.0473 "
-	             "-47.4094 "
-	             "-48.7919 "
-	             "-50.1948 "
-	             "-51.6182 "
-	             "-53.0619 "
-	             "-54.526 "
-	             "-56.0106 "
-	             "-57.5155" );
-	CHECK_CLOSE ( exp_f1, l_f1, epsilon );
+    vec exp_f1 ( "-7.51551 -7.02066 "
+                 "-6.54622 -6.09219 "
+                 "-5.65856 -5.24534 "
+                 "-4.85252 -4.48011 -4.1281 "
+                 "-3.7965 -3.48531 -3.19452 "
+                 "-2.92414 -2.67417 -2.4446 -2.23544 -2.04668 "
+                 "-1.87833 -1.73039 -1.60285 -1.49572 -1.40899 -1.34267 -1.29676 -1.27125 -1.26615 -1.28145 -1.31717 -1.37328 -1.4498 -1.54673 -1.66407 -1.80181 -1.95996 "
+                 "-2.13851 -2.33747 -2.55683 -2.79661 "
+                 "-3.05678 -3.33737 -3.63836 -3.95975 "
+                 "-4.30155 -4.66376 "
+                 "-5.04638 -5.4494 -5.87282 "
+                 "-6.31665 -6.78089 "
+                 "-7.26554 -7.77059 "
+                 "-8.29604 -8.84191 "
+                 "-9.40818 -9.99485 "
+                 "-10.6019 "
+                 "-11.2294 -11.8773 "
+                 "-12.5456 "
+                 "-13.2343 -13.9434 "
+                 "-14.6729 "
+                 "-15.4229 "
+                 "-16.1932 -16.9839 "
+                 "-17.7951 "
+                 "-18.6266 "
+                 "-19.4786 "
+                 "-20.3509 "
+                 "-21.2437 "
+                 "-22.1569 "
+                 "-23.0905 "
+                 "-24.0444 "
+                 "-25.0188 "
+                 "-26.0136 "
+                 "-27.0288 "
+                 "-28.0644 "
+                 "-29.1205 "
+                 "-30.1969 "
+                 "-31.2937 "
+                 "-32.4109 "
+                 "-33.5486 "
+                 "-34.7066 "
+                 "-35.8851 "
+                 "-37.0839 "
+                 "-38.3032 "
+                 "-39.5429 "
+                 "-40.8029 "
+                 "-42.0834 "
+                 "-43.3843 "
+                 "-44.7056 "
+                 "-46.0473 "
+                 "-47.4094 "
+                 "-48.7919 "
+                 "-50.1948 "
+                 "-51.6182 "
+                 "-53.0619 "
+                 "-54.526 "
+                 "-56.0106 "
+                 "-57.5155" );
+    CHECK_CLOSE ( exp_f1, l_f1, epsilon );
 
-	vec exp_f2 ( "-13.3202 -13.0192 "
-	             "-12.7223 -12.4295 -12.1408 "
-	             "-11.8561 -11.5755 -11.299 -11.0266 "
-	             "-10.7582 -10.494 -10.2338 "
-	             "-9.97772 -9.7257 -9.47777 -9.23391 "
-	             "-8.99414 -8.75845 -8.52684 -8.29931 -8.07587 "
-	             "-7.8565 -7.64122 -7.43002 -7.22289 -7.01985 "
-	             "-6.82089 -6.62602 -6.43522 -6.2485 -6.06587 "
-	             "-5.88732 -5.71284 -5.54245 -5.37614 -5.21392 -5.05577 "
-	             "-4.9017 -4.75172 -4.60581 -4.46399 -4.32625 -4.19259 -4.06301 "
-	             "-3.93752 -3.8161 -3.69876 -3.58551 -3.47634 -3.37125 -3.27024 -3.17331 -3.08046 "
-	             "-2.99169 -2.90701 -2.8264 -2.74988 -2.67744 -2.60908 -2.5448 -2.4846 -2.42849 -2.37645 -2.3285 -2.28462 -2.24483 -2.20912 -2.17749 -2.14994 -2.12648 -2.10709 -2.09179 -2.08056 -2.07342 -2.07036 -2.07138 -2.07648 -2.08566 -2.09893 -2.11627 -2.1377 -2.16321 -2.1928 -2.22647 -2.26422 -2.30605 -2.35196 -2.40196 -2.45603 -2.51419 -2.57643 -2.64275 -2.71315 -2.78763 -2.8662 -2.94884 "
-	             "-3.03557 -3.12637 -3.22126 -3.32023" );
-	CHECK_CLOSE ( exp_f2, l_f2, epsilon );
+    vec exp_f2 ( "-13.3202 -13.0192 "
+                 "-12.7223 -12.4295 -12.1408 "
+                 "-11.8561 -11.5755 -11.299 -11.0266 "
+                 "-10.7582 -10.494 -10.2338 "
+                 "-9.97772 -9.7257 -9.47777 -9.23391 "
+                 "-8.99414 -8.75845 -8.52684 -8.29931 -8.07587 "
+                 "-7.8565 -7.64122 -7.43002 -7.22289 -7.01985 "
+                 "-6.82089 -6.62602 -6.43522 -6.2485 -6.06587 "
+                 "-5.88732 -5.71284 -5.54245 -5.37614 -5.21392 -5.05577 "
+                 "-4.9017 -4.75172 -4.60581 -4.46399 -4.32625 -4.19259 -4.06301 "
+                 "-3.93752 -3.8161 -3.69876 -3.58551 -3.47634 -3.37125 -3.27024 -3.17331 -3.08046 "
+                 "-2.99169 -2.90701 -2.8264 -2.74988 -2.67744 -2.60908 -2.5448 -2.4846 -2.42849 -2.37645 -2.3285 -2.28462 -2.24483 -2.20912 -2.17749 -2.14994 -2.12648 -2.10709 -2.09179 -2.08056 -2.07342 -2.07036 -2.07138 -2.07648 -2.08566 -2.09893 -2.11627 -2.1377 -2.16321 -2.1928 -2.22647 -2.26422 -2.30605 -2.35196 -2.40196 -2.45603 -2.51419 -2.57643 -2.64275 -2.71315 -2.78763 -2.8662 -2.94884 "
+                 "-3.03557 -3.12637 -3.22126 -3.32023" );
+    CHECK_CLOSE ( exp_f2, l_f2, epsilon );
 
-	vec exp_m2 ( "-7.95304 -7.47281 -7.01175 "
-	             "-6.56987 -6.14716 "
-	             "-5.74362 -5.35927 "
-	             "-4.99408 -4.64808 -4.32125 -4.01359 "
-	             "-3.72511 -3.45581 -3.20568 "
-	             "-2.97473 -2.76295 -2.57035 -2.39692 -2.24267 -2.1076 "
-	             "-1.9917 -1.89498 -1.81743 -1.75905 -1.71986 -1.69984 -1.69899 -1.71732 -1.75483 -1.81151 -1.88736 -1.9824 "
-	             "-2.0966 -2.22999 -2.38255 -2.55428 -2.74519 -2.95528 "
-	             "-3.18454 -3.43298 -3.70059 -3.98738 "
-	             "-4.2008 -4.10829 -4.0211 "
-	             "-3.93921 -3.86263 -3.79137 -3.72542 -3.66478 -3.60945 -3.55944 -3.51473 -3.47534 -3.44126 -3.41249 -3.38903 -3.37088 -3.35805 -3.35053 -3.34831 -3.35141 -3.35983 -3.37355 -3.39259 -3.41693 -3.44659 -3.48156 -3.52185 -3.56744 -3.61835 -3.67457 -3.73609 -3.80294 -3.87509 -3.95255 "
-	             "-4.03533 -4.12342 -4.21682 -4.31553 -4.41955 -4.52889 -4.64353 -4.76349 -4.88876 "
-	             "-5.01934 -5.15524 -5.29644 -5.44296 -5.59479 -5.75193 -5.91438 "
-	             "-6.08214 -6.25522 -6.4336 -6.6173 -6.80631 "
-	             "-7.00064 -7.20027 -7.40522" );
-	CHECK_CLOSE ( exp_m2, m2, epsilon );
+    vec exp_m2 ( "-7.95304 -7.47281 -7.01175 "
+                 "-6.56987 -6.14716 "
+                 "-5.74362 -5.35927 "
+                 "-4.99408 -4.64808 -4.32125 -4.01359 "
+                 "-3.72511 -3.45581 -3.20568 "
+                 "-2.97473 -2.76295 -2.57035 -2.39692 -2.24267 -2.1076 "
+                 "-1.9917 -1.89498 -1.81743 -1.75905 -1.71986 -1.69984 -1.69899 -1.71732 -1.75483 -1.81151 -1.88736 -1.9824 "
+                 "-2.0966 -2.22999 -2.38255 -2.55428 -2.74519 -2.95528 "
+                 "-3.18454 -3.43298 -3.70059 -3.98738 "
+                 "-4.2008 -4.10829 -4.0211 "
+                 "-3.93921 -3.86263 -3.79137 -3.72542 -3.66478 -3.60945 -3.55944 -3.51473 -3.47534 -3.44126 -3.41249 -3.38903 -3.37088 -3.35805 -3.35053 -3.34831 -3.35141 -3.35983 -3.37355 -3.39259 -3.41693 -3.44659 -3.48156 -3.52185 -3.56744 -3.61835 -3.67457 -3.73609 -3.80294 -3.87509 -3.95255 "
+                 "-4.03533 -4.12342 -4.21682 -4.31553 -4.41955 -4.52889 -4.64353 -4.76349 -4.88876 "
+                 "-5.01934 -5.15524 -5.29644 -5.44296 -5.59479 -5.75193 -5.91438 "
+                 "-6.08214 -6.25522 -6.4336 -6.6173 -6.80631 "
+                 "-7.00064 -7.20027 -7.40522" );
+    CHECK_CLOSE ( exp_m2, m2, epsilon );
 }
 
 TEST ( merger_base_sources_test ) {
-	UIFile in ( "merger.cfg" );
+    UIFile in ( "merger.cfg" );
 
-	shared_ptr<merger_base> mb =
-	    UI::build<merger_base> ( in, "Merger", UI::compulsory );
+    shared_ptr<merger_base> mb =
+        UI::build<merger_base> ( in, "Merger", UI::compulsory );
 
-	pdf_array sources;
-	UI::get ( sources, in, "Sources", UI::compulsory );
-	mb->set_sources ( sources );
+    pdf_array sources;
+    UI::get ( sources, in, "Sources", UI::compulsory );
+    mb->set_sources ( sources );
 
-	shared_ptr<rectangular_support> support =
-	    UI::build<rectangular_support> ( in, "Support", UI::compulsory );
-	mb->set_support ( *support );
+    shared_ptr<rectangular_support> support =
+        UI::build<rectangular_support> ( in, "Support", UI::compulsory );
+    mb->set_support ( *support );
 
-	mb->merge();
-	vec m = mb->mean();
-	CHECK_EQUAL ( 2, m.size() );
+    mb->merge();
+    vec m = mb->mean();
+    CHECK_EQUAL ( 2, m.size() );
 }
 
 TEST ( merger_base_sources_error_test ) {
-	UIFile in ( "merger_error.cfg" );
+    UIFile in ( "merger_error.cfg" );
 
-	pdf_array sources;
-	try {
-		UI::get ( sources, in, "Sources", UI::compulsory );
-		CHECK ( false );
-	} catch ( UISettingException &exc ) {
-		CHECK ( exc.what() );
-	}
+    pdf_array sources;
+    try {
+        UI::get ( sources, in, "Sources", UI::compulsory );
+        CHECK ( false );
+    } catch ( UISettingException &exc ) {
+        CHECK ( exc.what() );
+    }
 }
Index: library/tests/testsuite/LQG_test.cpp
===================================================================
--- library/tests/testsuite/LQG_test.cpp (revision 737)
+++ library/tests/testsuite/LQG_test.cpp (revision 1064)
@@ -6,87 +6,87 @@
 
 TEST ( LQG_test ) {
-	LQG reg;
-	shared_ptr<StateSpace<chmat> > stsp = new StateSpace<chmat>;
-	// 2 x 1 x 1
-	stsp-> set_parameters ( eye ( 2 ), ones ( 2, 1 ), ones ( 1, 2 ), ones ( 1, 1 ), /* Q,R */ eye ( 2 ), eye ( 1 ) );
-	reg.set_system ( stsp ); // A, B, C
-	reg.set_control_parameters ( eye ( 1 ), eye ( 1 ),  vec_1 ( 1.0 ), 6 ); //Qy, Qu, horizon
-	reg.validate();
+    LQG reg;
+    shared_ptr<StateSpace<chmat> > stsp = new StateSpace<chmat>;
+    // 2 x 1 x 1
+    stsp-> set_parameters ( eye ( 2 ), ones ( 2, 1 ), ones ( 1, 2 ), ones ( 1, 1 ), /* Q,R */ eye ( 2 ), eye ( 1 ) );
+    reg.set_system ( stsp ); // A, B, C
+    reg.set_control_parameters ( eye ( 1 ), eye ( 1 ),  vec_1 ( 1.0 ), 6 ); //Qy, Qu, horizon
+    reg.validate();
 
-	reg.redesign();
-	double reg_apply = reg.ctrlaction ( "0.5, 1.1", "0.0" ) ( 0 ); /*convert vec to double*/
-	CHECK_CLOSE ( reg_apply, -0.248528137234392, 0.0001 );
+    reg.redesign();
+    double reg_apply = reg.ctrlaction ( "0.5, 1.1", "0.0" ) ( 0 ); /*convert vec to double*/
+    CHECK_CLOSE ( reg_apply, -0.248528137234392, 0.0001 );
 }
 
 TEST ( to_state_test ) {
-	mlnorm<fsqmat> ml;
-	mat A = "1.1, 2.3";
-	ml.set_parameters ( A, vec_1 ( 1.3 ), eye ( 1 ) );
-	RV yr = RV ( "y", 1 );
-	RV ur = RV ( "u", 1 );
-	ml.set_rv ( yr );
-	yr.t_plus ( -1 );
-	ml.set_rvc ( concat ( yr, ur ) );
+    mlnorm<fsqmat> ml;
+    mat A = "1.1, 2.3";
+    ml.set_parameters ( A, vec_1 ( 1.3 ), eye ( 1 ) );
+    RV yr = RV ( "y", 1 );
+    RV ur = RV ( "u", 1 );
+    ml.set_rv ( yr );
+    yr.t_plus ( -1 );
+    ml.set_rvc ( concat ( yr, ur ) );
 
-	shared_ptr<StateCanonical > Stsp = new StateCanonical;
-	Stsp->connect_mlnorm ( ml );
+    shared_ptr<StateCanonical > Stsp = new StateCanonical;
+    Stsp->connect_mlnorm ( ml );
 
-	/* results from
-	[A,B,C,D]=tf2ss([2.3 0],[1 -1.1])
-	*/
-	CHECK_CLOSE_EX ( Stsp->_A().get_row ( 0 ), vec ( "1.1" ), 0.0001 );
-	CHECK_CLOSE_EX ( Stsp->_C().get_row ( 0 ), vec ( "2.53" ), 0.0001 );
-	CHECK_CLOSE_EX ( Stsp->_D().get_row ( 0 ), vec ( "2.30" ), 0.0001 );
+    /* results from
+    [A,B,C,D]=tf2ss([2.3 0],[1 -1.1])
+    */
+    CHECK_CLOSE_EX ( Stsp->_A().get_row ( 0 ), vec ( "1.1" ), 0.0001 );
+    CHECK_CLOSE_EX ( Stsp->_C().get_row ( 0 ), vec ( "2.53" ), 0.0001 );
+    CHECK_CLOSE_EX ( Stsp->_D().get_row ( 0 ), vec ( "2.30" ), 0.0001 );
 }
 
 TEST ( to_state_arx_test ) {
-	mlnorm<chmat> ml;
-	mat A = "1.1, 2.3, 3.4";
-	ml.set_parameters ( A, vec_1 ( 1.3 ), eye ( 1 ) );
-	RV yr = RV ( "y", 1 );
-	RV ur = RV ( "u", 1 );
-	ml.set_rv ( yr );
-	ml.set_rvc ( concat ( yr.copy_t ( -1 ), concat ( ur, ur.copy_t ( -1 ) ) ) );
+    mlnorm<chmat> ml;
+    mat A = "1.1, 2.3, 3.4";
+    ml.set_parameters ( A, vec_1 ( 1.3 ), eye ( 1 ) );
+    RV yr = RV ( "y", 1 );
+    RV ur = RV ( "u", 1 );
+    ml.set_rv ( yr );
+    ml.set_rvc ( concat ( yr.copy_t ( -1 ), concat ( ur, ur.copy_t ( -1 ) ) ) );
 
-	shared_ptr<StateFromARX> Stsp = new StateFromARX;
-	RV xrv;
-	RV urv;
-	Stsp->connect_mlnorm ( ml, xrv, urv );
+    shared_ptr<StateFromARX> Stsp = new StateFromARX;
+    RV xrv;
+    RV urv;
+    Stsp->connect_mlnorm ( ml, xrv, urv );
 
-	/* results from
-	[A,B,C,D]=tf2ss([2.3 0],[1 -1.1])
-	*/
-	CHECK_CLOSE_EX ( Stsp->_A().get_row ( 0 ), vec ( "1.1, 3.4, 1.3" ), 0.0001 );
-	CHECK_CLOSE_EX ( Stsp->_B().get_row ( 0 ), vec ( "2.3" ), 0.0001 );
-	CHECK_CLOSE_EX ( Stsp->_C().get_row ( 0 ), vec ( "1, 0, 0" ), 0.0001 );
+    /* results from
+    [A,B,C,D]=tf2ss([2.3 0],[1 -1.1])
+    */
+    CHECK_CLOSE_EX ( Stsp->_A().get_row ( 0 ), vec ( "1.1, 3.4, 1.3" ), 0.0001 );
+    CHECK_CLOSE_EX ( Stsp->_B().get_row ( 0 ), vec ( "2.3" ), 0.0001 );
+    CHECK_CLOSE_EX ( Stsp->_C().get_row ( 0 ), vec ( "1, 0, 0" ), 0.0001 );
 }
 
 TEST ( arx_LQG_test ) {
-	mlnorm<chmat> ml;
-	mat A = "1.81, -.81, .00468, .00438";
-	ml.set_parameters ( A, vec_1 ( 0.0 ), 0.00001*eye ( 1 ) );
-	RV yr = RV ( "y", 1 );
-	RV ur = RV ( "u", 1 );
-	RV rgr = yr.copy_t ( -1 );
-	rgr.add ( yr.copy_t ( -2 ) );
-	rgr.add ( yr.copy_t ( -2 ) );
-	rgr.add ( ur.copy_t ( -1 ) );
-	rgr.add ( ur );
+    mlnorm<chmat> ml;
+    mat A = "1.81, -.81, .00468, .00438";
+    ml.set_parameters ( A, vec_1 ( 0.0 ), 0.00001*eye ( 1 ) );
+    RV yr = RV ( "y", 1 );
+    RV ur = RV ( "u", 1 );
+    RV rgr = yr.copy_t ( -1 );
+    rgr.add ( yr.copy_t ( -2 ) );
+    rgr.add ( yr.copy_t ( -2 ) );
+    rgr.add ( ur.copy_t ( -1 ) );
+    rgr.add ( ur );
 
-	ml.set_rv ( yr );
-	ml.set_rvc ( rgr );
-	ml.validate();
+    ml.set_rv ( yr );
+    ml.set_rvc ( rgr );
+    ml.validate();
 
-	shared_ptr<StateFromARX> Stsp = new StateFromARX;
-	RV xrv;
-	RV urv;
-	Stsp->connect_mlnorm ( ml, xrv, urv );
+    shared_ptr<StateFromARX> Stsp = new StateFromARX;
+    RV xrv;
+    RV urv;
+    Stsp->connect_mlnorm ( ml, xrv, urv );
 
-	LQG L;
-	L.set_system ( Stsp );
-	L.set_control_parameters ( eye ( 1 ), sqrt ( 1.0 / 1000 ) *eye ( 1 ), vec_1 ( 0.0 ), 100 );
-	L.validate();
+    LQG L;
+    L.set_system ( Stsp );
+    L.set_control_parameters ( eye ( 1 ), sqrt ( 1.0 / 1000 ) *eye ( 1 ), vec_1 ( 0.0 ), 100 );
+    L.validate();
 
-	L.redesign();
-	cout << L.to_string() << endl;
+    L.redesign();
+    cout << L.to_string() << endl;
 }
Index: library/tests/testsuite/datalink_test.cpp
===================================================================
--- library/tests/testsuite/datalink_test.cpp (revision 737)
+++ library/tests/testsuite/datalink_test.cpp (revision 1064)
@@ -6,106 +6,106 @@
 
 TEST ( datalink_test ) {
-	// RV names are global, and a, b and c are already taken by a
-	// different test...
-	RV a = RV ( "{dla }", "2" );
-	RV b = RV ( "{dlb }" );
-	RV c = RV ( "{dlc }" );
+    // RV names are global, and a, b and c are already taken by a
+    // different test...
+    RV a = RV ( "{dla }", "2" );
+    RV b = RV ( "{dlb }" );
+    RV c = RV ( "{dlc }" );
 
-	RV ab = a;
-	ab.add ( b );
+    RV ab = a;
+    ab.add ( b );
 
-	RV abc = ab;
-	abc.add ( c );
+    RV abc = ab;
+    abc.add ( c );
 
-	datalink dl ( ab, abc );
-	vec total ( "0 37 42 66" );
-	vec filtered = dl.pushdown ( total );
-	int exp_f[] = { 0, 37, 42 };
-	int exp_sz = sizeof ( exp_f ) / sizeof ( exp_f[0] );
-	CHECK_EQUAL ( exp_sz, filtered.size() );
-	for ( int i = 0; i < exp_sz; ++i ) {
-		CHECK_EQUAL ( exp_f[i], filtered ( i ) );
-	}
+    datalink dl ( ab, abc );
+    vec total ( "0 37 42 66" );
+    vec filtered = dl.pushdown ( total );
+    int exp_f[] = { 0, 37, 42 };
+    int exp_sz = sizeof ( exp_f ) / sizeof ( exp_f[0] );
+    CHECK_EQUAL ( exp_sz, filtered.size() );
+    for ( int i = 0; i < exp_sz; ++i ) {
+        CHECK_EQUAL ( exp_f[i], filtered ( i ) );
+    }
 
-	datalink unnamed;
-	unnamed.set_connection ( 1, 2, ivec ( "0" ) );
-	filtered = unnamed.pushdown ( vec ( "37 42" ) );
-	CHECK_EQUAL ( vec ( "37" ), filtered );
+    datalink unnamed;
+    unnamed.set_connection ( 1, 2, ivec ( "0" ) );
+    filtered = unnamed.pushdown ( vec ( "37 42" ) );
+    CHECK_EQUAL ( vec ( "37" ), filtered );
 }
 
 TEST ( datalink_m2e_test ) {
-	RV a = RV ( "{dla }", "2" );
-	RV b = RV ( "{dlb }" );
-	RV c = RV ( "{dlc }" );
+    RV a = RV ( "{dla }", "2" );
+    RV b = RV ( "{dlb }" );
+    RV c = RV ( "{dlc }" );
 
-	RV ab = a;
-	ab.add ( b );
+    RV ab = a;
+    ab.add ( b );
 
-	RV ba = a;
-	ba.add ( b );
+    RV ba = a;
+    ba.add ( b );
 
-	RV abc = ab;
-	abc.add ( c );
+    RV abc = ab;
+    abc.add ( c );
 
-	datalink_m2e dl;
-	dl.set_connection ( ba, c, abc );
-	vec total ( "0 37 42 66" );
-	vec cond = dl.get_cond ( total );
-	CHECK_EQUAL ( 1, cond.size() );
-	CHECK_EQUAL ( 66, cond ( 0 ) );
+    datalink_m2e dl;
+    dl.set_connection ( ba, c, abc );
+    vec total ( "0 37 42 66" );
+    vec cond = dl.get_cond ( total );
+    CHECK_EQUAL ( 1, cond.size() );
+    CHECK_EQUAL ( 66, cond ( 0 ) );
 
-	vec big ( 4 );
-	dl.pushup_cond ( big, vec ( "2 3 5" ), vec ( "7" ) );
-	CHECK_EQUAL ( vec ( "2 3 5 7" ), big );
+    vec big ( 4 );
+    dl.pushup_cond ( big, vec ( "2 3 5" ), vec ( "7" ) );
+    CHECK_EQUAL ( vec ( "2 3 5 7" ), big );
 }
 
 TEST ( datalink_m2m_test ) {
-	RV a = RV ( "{dla }", "2" );
-	RV b = RV ( "{dlb }" );
-	RV c = RV ( "{dlc }" );
+    RV a = RV ( "{dla }", "2" );
+    RV b = RV ( "{dlb }" );
+    RV c = RV ( "{dlc }" );
 
-	datalink_m2m dl;
-	dl.set_connection ( a, concat ( b, c ), concat ( a, b ), c );
+    datalink_m2m dl;
+    dl.set_connection ( a, concat ( b, c ), concat ( a, b ), c );
 
-	vec val ( "1 1.5 2" );
-	vec cond ( "3" );
+    vec val ( "1 1.5 2" );
+    vec cond ( "3" );
 
-	vec p = dl.pushdown ( val );
-	double exp_p[] = { 1.0, 1.5 };
-	int exp_sz = sizeof ( exp_p ) / sizeof ( exp_p[0] );
-	CHECK_EQUAL ( exp_sz, p.size() );
-	for ( int i = 0; i < exp_sz; ++i ) {
-		CHECK_EQUAL ( exp_p[i], p ( i ) );
-	}
+    vec p = dl.pushdown ( val );
+    double exp_p[] = { 1.0, 1.5 };
+    int exp_sz = sizeof ( exp_p ) / sizeof ( exp_p[0] );
+    CHECK_EQUAL ( exp_sz, p.size() );
+    for ( int i = 0; i < exp_sz; ++i ) {
+        CHECK_EQUAL ( exp_p[i], p ( i ) );
+    }
 
-	vec dlcond = dl.get_cond ( val, cond );
-	int exp_c[] = { 2, 3 };
-	exp_sz = sizeof ( exp_c ) / sizeof ( exp_c[0] );
-	CHECK_EQUAL ( exp_sz, dlcond.size() );
-	for ( int i = 0; i < exp_sz; ++i ) {
-		CHECK_EQUAL ( exp_c[i], dlcond ( i ) );
-	}
+    vec dlcond = dl.get_cond ( val, cond );
+    int exp_c[] = { 2, 3 };
+    exp_sz = sizeof ( exp_c ) / sizeof ( exp_c[0] );
+    CHECK_EQUAL ( exp_sz, dlcond.size() );
+    for ( int i = 0; i < exp_sz; ++i ) {
+        CHECK_EQUAL ( exp_c[i], dlcond ( i ) );
+    }
 }
 
 TEST ( datalink_buffered_test ) {
-	RV a = RV ( "{dl_a }" );
-	RV b = RV ( "{dlb }" );
-	RV ab = concat ( a, b );
-	RV aa = a;
-	a.t_plus ( -1 );
-	aa.add ( a );
+    RV a = RV ( "{dl_a }" );
+    RV b = RV ( "{dlb }" );
+    RV ab = concat ( a, b );
+    RV aa = a;
+    a.t_plus ( -1 );
+    aa.add ( a );
 
 
-	datalink_buffered dl;
-	dl.set_connection ( concat ( aa, b ), ab );
+    datalink_buffered dl;
+    dl.set_connection ( concat ( aa, b ), ab );
 
-	vec val_up ( "1 2" );
-	dl.store_data ( val_up );
-	val_up = "3 4";
+    vec val_up ( "1 2" );
+    dl.store_data ( val_up );
+    val_up = "3 4";
 
 
-	vec p = dl.pushdown ( val_up );
-	vec exp_p = " 3, 1, 4 ";
-	CHECK_EQUAL ( exp_p, p );
+    vec p = dl.pushdown ( val_up );
+    vec exp_p = " 3, 1, 4 ";
+    CHECK_EQUAL ( exp_p, p );
 
 }
Index: library/tests/testsuite/user_info_test.cpp
===================================================================
--- library/tests/testsuite/user_info_test.cpp (revision 942)
+++ library/tests/testsuite/user_info_test.cpp (revision 1064)
@@ -12,28 +12,28 @@
 public:
 
-	Passenger() {
-	}
+    Passenger() {
+    }
 };
 
 class Human : public Passenger {
 public:
-	string name;
-
-	Human() {
-		name = "none";
-	}
-
-	virtual void from_setting ( const Setting &set ) {
-		UI::get ( name, set, "name" );
-	}
-
-	virtual void to_setting ( Setting &set ) const {
-		Setting &name_setting = set.add ( "name", Setting::TypeString );
-		name_setting = name;
-	}
-
-	string to_string()  const {
-		return name;
-	}
+    string name;
+
+    Human() {
+        name = "none";
+    }
+
+    virtual void from_setting ( const Setting &set ) {
+        UI::get ( name, set, "name" );
+    }
+
+    virtual void to_setting ( Setting &set ) const {
+        Setting &name_setting = set.add ( "name", Setting::TypeString );
+        name_setting = name;
+    }
+
+    string to_string()  const {
+        return name;
+    }
 };
 
@@ -42,30 +42,30 @@
 class Robot : public Passenger {
 public:
-	int number;
-	Array<string> software;
-
-	Robot() : software() {
-		number = -1;
-	}
-
-	virtual void from_setting ( const Setting &set ) {
-		UI::get ( number, set, "number" );
-		UI::get ( software, set, "software" );
-	}
-
-	virtual void to_setting ( Setting &set ) const {
-		Setting &number_setting = set.add ( "number", Setting::TypeInt );
-		number_setting = number;
-
-		UI::save ( software, set, "software" );
-	}
-
-	string to_string()  const {
-		stringstream stream;
-		stream << number;
-		for ( int i = 0; i < software.length(); i++ )
-			stream << "_" + software ( i );
-		return stream.str();
-	}
+    int number;
+    Array<string> software;
+
+    Robot() : software() {
+        number = -1;
+    }
+
+    virtual void from_setting ( const Setting &set ) {
+        UI::get ( number, set, "number" );
+        UI::get ( software, set, "software" );
+    }
+
+    virtual void to_setting ( Setting &set ) const {
+        Setting &number_setting = set.add ( "number", Setting::TypeInt );
+        number_setting = number;
+
+        UI::save ( software, set, "software" );
+    }
+
+    string to_string()  const {
+        stringstream stream;
+        stream << number;
+        for ( int i = 0; i < software.length(); i++ )
+            stream << "_" + software ( i );
+        return stream.str();
+    }
 };
 
@@ -74,73 +74,73 @@
 class Transport : public root {
 public:
-	int year;
-	string manufacturer;
-
-	Transport() : year ( 1900 ), manufacturer ( "unknown" ) {
-	}
-
-	Transport ( int year, string manufacturer ) :
-			year ( year ), manufacturer ( manufacturer ) {
-	}
-
-	virtual void from_setting ( const Setting &set ) {
-		UI::get ( year, set, "year" );
-		UI::get ( manufacturer, set, "manufacturer" );
-	}
-
-	virtual void to_setting ( Setting &set ) const {
-		Setting &year_setting = set.add ( "year", Setting::TypeInt );
-		year_setting = year;
-
-		Setting &manufacturer_setting = set.add ( "manufacturer", Setting::TypeString );
-		manufacturer_setting = manufacturer;
-	}
-
-	virtual string to_string() const
-	{
-		return "the method to_string() is not implemented";
-	}
+    int year;
+    string manufacturer;
+
+    Transport() : year ( 1900 ), manufacturer ( "unknown" ) {
+    }
+
+    Transport ( int year, string manufacturer ) :
+        year ( year ), manufacturer ( manufacturer ) {
+    }
+
+    virtual void from_setting ( const Setting &set ) {
+        UI::get ( year, set, "year" );
+        UI::get ( manufacturer, set, "manufacturer" );
+    }
+
+    virtual void to_setting ( Setting &set ) const {
+        Setting &year_setting = set.add ( "year", Setting::TypeInt );
+        year_setting = year;
+
+        Setting &manufacturer_setting = set.add ( "manufacturer", Setting::TypeString );
+        manufacturer_setting = manufacturer;
+    }
+
+    virtual string to_string() const
+    {
+        return "the method to_string() is not implemented";
+    }
 };
 
 class Car : public Transport {
 public:
-	int kilometers;
-	Array<shared_ptr<Passenger> > passengers;
-
-	Car() : Transport() {
-		kilometers = 0;
-	}
-
-
-	Car ( int year, string manufacturer, int kilometers )
-			: Transport ( year, manufacturer ), kilometers ( kilometers ) {
-	}
-
-	virtual void from_setting ( const Setting &set ) {
-		Transport::from_setting ( set );
-
-		UI::get ( kilometers, set, "kilometers" );
-		UI::get ( passengers, set, "passengers" );
-	}
-
-	virtual void to_setting ( Setting &set ) const {
-		Transport::to_setting ( set );
-
-		Setting &kilometers_setting = set.add ( "kilometers", Setting::TypeInt );
-		kilometers_setting = kilometers;
-
-		UI::save ( passengers, set, "passengers" );
-	}
-
-	string to_string()  const {
-		stringstream stream;
-		stream << "A car made in " << year << " by " << manufacturer << ", having " << kilometers << " kilometers on the clock.";
-		if ( passengers.length() ) {
-			stream << "The names of passengers are as follows: ";
-			for ( int i = 0; i < passengers.length(); i++ )
-				stream << passengers ( i )->to_string() << " ";
-		}
-		return stream.str();
-	}
+    int kilometers;
+    Array<shared_ptr<Passenger> > passengers;
+
+    Car() : Transport() {
+        kilometers = 0;
+    }
+
+
+    Car ( int year, string manufacturer, int kilometers )
+        : Transport ( year, manufacturer ), kilometers ( kilometers ) {
+    }
+
+    virtual void from_setting ( const Setting &set ) {
+        Transport::from_setting ( set );
+
+        UI::get ( kilometers, set, "kilometers" );
+        UI::get ( passengers, set, "passengers" );
+    }
+
+    virtual void to_setting ( Setting &set ) const {
+        Transport::to_setting ( set );
+
+        Setting &kilometers_setting = set.add ( "kilometers", Setting::TypeInt );
+        kilometers_setting = kilometers;
+
+        UI::save ( passengers, set, "passengers" );
+    }
+
+    string to_string()  const {
+        stringstream stream;
+        stream << "A car made in " << year << " by " << manufacturer << ", having " << kilometers << " kilometers on the clock.";
+        if ( passengers.length() ) {
+            stream << "The names of passengers are as follows: ";
+            for ( int i = 0; i < passengers.length(); i++ )
+                stream << passengers ( i )->to_string() << " ";
+        }
+        return stream.str();
+    }
 };
 
@@ -149,44 +149,44 @@
 class Bike : public Transport {
 public:
-	bool electricLights;
-	mat matr;
-
-	Bike() : Transport(), matr ( "2,2;3,4" ) {
-		electricLights = false;
-	}
-
-	Bike ( int year, string manufacturer, bool electricLights )
-			: Transport ( year, manufacturer ), electricLights ( electricLights ) {
-	}
-
-	~Bike() {
-	}
-
-	void from_setting ( const Setting &set ) {
-		Transport::from_setting ( set );
-
-		int elights;
-		if ( UI::get ( elights, set, "electricLights", UI::optional ) ) {
-			electricLights = !!elights;
-		}
-
-		UI::get ( matr, set, "matr" );
-	}
-
-	void to_setting ( Setting &set ) const {
-		Transport::to_setting ( set );
-
-		Setting &electricLights_setting = set.add ( "electricLights", Setting::TypeBoolean );
-		electricLights_setting = electricLights;
-
-		UI::save ( matr, set, "matr" );
-	}
-
-	string to_string()  const {
-		stringstream stream;
-		stream << "a bike made in " << year << " by " << manufacturer;
-		if ( electricLights ) stream << " with electric lights included";
-		return stream.str();
-	}
+    bool electricLights;
+    mat matr;
+
+    Bike() : Transport(), matr ( "2,2;3,4" ) {
+        electricLights = false;
+    }
+
+    Bike ( int year, string manufacturer, bool electricLights )
+        : Transport ( year, manufacturer ), electricLights ( electricLights ) {
+    }
+
+    ~Bike() {
+    }
+
+    void from_setting ( const Setting &set ) {
+        Transport::from_setting ( set );
+
+        int elights;
+        if ( UI::get ( elights, set, "electricLights", UI::optional ) ) {
+            electricLights = !!elights;
+        }
+
+        UI::get ( matr, set, "matr" );
+    }
+
+    void to_setting ( Setting &set ) const {
+        Transport::to_setting ( set );
+
+        Setting &electricLights_setting = set.add ( "electricLights", Setting::TypeBoolean );
+        electricLights_setting = electricLights;
+
+        UI::save ( matr, set, "matr" );
+    }
+
+    string to_string()  const {
+        stringstream stream;
+        stream << "a bike made in " << year << " by " << manufacturer;
+        if ( electricLights ) stream << " with electric lights included";
+        return stream.str();
+    }
 };
 
@@ -195,7 +195,7 @@
 class Teleport : public Transport {
 public:
-	void to_setting ( Setting &set ) const {
-		set.add ( "this throws", Setting::TypeNone );
-	}
+    void to_setting ( Setting &set ) const {
+        set.add ( "this throws", Setting::TypeNone );
+    }
 };
 
@@ -203,81 +203,81 @@
 
 TEST ( load_test ) {
-	UIFile in ( "user_info_valid.cfg" );
-	shared_ptr<Transport> pepikovo ( UI::build<Transport> ( in, "pepikovo", UI::compulsory ) );
-	CHECK_EQUAL ( string ( "A car made in 1998 by audi, having 25000 kilometers on the clock.The names of passengers are as follows: Karlos Novak -1_CygWin_Matlab_Aimsun Karlosik Novacek " ), pepikovo->to_string() );
-
-	Transport pepikovo_static;
-	UI::get( pepikovo_static, in, "pepikovo", UI::compulsory );
-	CHECK_EQUAL ( string ( "the method to_string() is not implemented" ), pepikovo_static.to_string() );
-	
-	shared_ptr<Transport> jardovo ( UI::build<Transport> ( in, "jardovo", UI::compulsory ) );
-	CHECK_EQUAL ( string ( "A car made in 1992 by liaz, having 1555000 kilometers on the clock." ), jardovo->to_string() );
-
-	shared_ptr<Transport> ondrejovo ( UI::build<Transport> ( in, "ondrejovo", UI::compulsory ) );
-	CHECK_EQUAL ( string ( "a bike made in 1996 by author with electric lights included" ), ondrejovo->to_string() );
-
-	shared_ptr<Transport> elisky ( UI::build<Transport> ( in, "elisky", UI::compulsory ) );
-	CHECK_EQUAL ( string ( "A car made in 1992 by liaz, having 1555000 kilometers on the clock." ), elisky->to_string() );
-
-	shared_ptr<Transport> kati ( UI::build<Transport> ( in, "kati", UI::compulsory ) );
-	CHECK_EQUAL ( string ( "A car made in 1980 by vecernicek, having 250000 kilometers on the clock." ), kati->to_string() );
+    UIFile in ( "user_info_valid.cfg" );
+    shared_ptr<Transport> pepikovo ( UI::build<Transport> ( in, "pepikovo", UI::compulsory ) );
+    CHECK_EQUAL ( string ( "A car made in 1998 by audi, having 25000 kilometers on the clock.The names of passengers are as follows: Karlos Novak -1_CygWin_Matlab_Aimsun Karlosik Novacek " ), pepikovo->to_string() );
+
+    Transport pepikovo_static;
+    UI::get( pepikovo_static, in, "pepikovo", UI::compulsory );
+    CHECK_EQUAL ( string ( "the method to_string() is not implemented" ), pepikovo_static.to_string() );
+
+    shared_ptr<Transport> jardovo ( UI::build<Transport> ( in, "jardovo", UI::compulsory ) );
+    CHECK_EQUAL ( string ( "A car made in 1992 by liaz, having 1555000 kilometers on the clock." ), jardovo->to_string() );
+
+    shared_ptr<Transport> ondrejovo ( UI::build<Transport> ( in, "ondrejovo", UI::compulsory ) );
+    CHECK_EQUAL ( string ( "a bike made in 1996 by author with electric lights included" ), ondrejovo->to_string() );
+
+    shared_ptr<Transport> elisky ( UI::build<Transport> ( in, "elisky", UI::compulsory ) );
+    CHECK_EQUAL ( string ( "A car made in 1992 by liaz, having 1555000 kilometers on the clock." ), elisky->to_string() );
+
+    shared_ptr<Transport> kati ( UI::build<Transport> ( in, "kati", UI::compulsory ) );
+    CHECK_EQUAL ( string ( "A car made in 1980 by vecernicek, having 250000 kilometers on the clock." ), kati->to_string() );
 }
 
 TEST ( load_error_test ) {
-	UIFile in ( "user_info_valid.cfg" );
-
-	try {
-		shared_ptr<Robot> failing ( UI::build<Robot> ( in, "elisky", UI::compulsory ) );
-		CHECK ( false );
-	} catch ( UIClassException &exc ) {
-		CHECK ( exc.what() );
-	}
-
-	try {
-		shared_ptr<Robot> failing ( UI::build<Robot> ( in, "kati", UI::compulsory ) );
-		CHECK ( false );
-	} catch ( UIException &exc ) {
-		CHECK ( exc.what() );
-	}
-
-	UIFile erroneous ( "user_info_erroneous.cfg" );
-	try {
-		shared_ptr<Transport> jardovo ( UI::build<Transport> ( erroneous, "jardovo", UI::compulsory ) );
-		CHECK ( false );
-	} catch ( UISettingException &exc ) {
-		CHECK ( exc.what() );
-	}
+    UIFile in ( "user_info_valid.cfg" );
+
+    try {
+        shared_ptr<Robot> failing ( UI::build<Robot> ( in, "elisky", UI::compulsory ) );
+        CHECK ( false );
+    } catch ( UIClassException &exc ) {
+        CHECK ( exc.what() );
+    }
+
+    try {
+        shared_ptr<Robot> failing ( UI::build<Robot> ( in, "kati", UI::compulsory ) );
+        CHECK ( false );
+    } catch ( UIException &exc ) {
+        CHECK ( exc.what() );
+    }
+
+    UIFile erroneous ( "user_info_erroneous.cfg" );
+    try {
+        shared_ptr<Transport> jardovo ( UI::build<Transport> ( erroneous, "jardovo", UI::compulsory ) );
+        CHECK ( false );
+    } catch ( UISettingException &exc ) {
+        CHECK ( exc.what() );
+    }
 }
 
 TEST ( save_test ) {
-	UIFile in ( "user_info_valid.cfg" );
-	shared_ptr<Transport> pepikovo ( UI::build<Transport> ( in, "pepikovo", UI::compulsory ) );
-
-	Car audi ( 1968, "zyl", 200 );
-	Car liaz ( 1989, "skoda", 1000 );
-	Bike author ( 2001, "noname", false );
-	UIFile out;
-
-	UI::save ( &audi, out, "marty" );
-	UI::save ( &liaz, out, "bohousovo" );
-	UI::save ( &author, out, "karlovo" );
-	UI::save ( pepikovo, out, "pepikovo" );
-	out.save ( "user_info_output.cfg" );
-
-	string expected ( load_test_file ( "user_info_matrix.cfg" ) );
-	string actual ( load_test_file ( "user_info_output.cfg" ) );
-	CHECK_EQUAL ( expected, actual );
+    UIFile in ( "user_info_valid.cfg" );
+    shared_ptr<Transport> pepikovo ( UI::build<Transport> ( in, "pepikovo", UI::compulsory ) );
+
+    Car audi ( 1968, "zyl", 200 );
+    Car liaz ( 1989, "skoda", 1000 );
+    Bike author ( 2001, "noname", false );
+    UIFile out;
+
+    UI::save ( &audi, out, "marty" );
+    UI::save ( &liaz, out, "bohousovo" );
+    UI::save ( &author, out, "karlovo" );
+    UI::save ( pepikovo, out, "pepikovo" );
+    out.save ( "user_info_output.cfg" );
+
+    string expected ( load_test_file ( "user_info_matrix.cfg" ) );
+    string actual ( load_test_file ( "user_info_output.cfg" ) );
+    CHECK_EQUAL ( expected, actual );
 }
 
 
 TEST ( save_error_test ) {
-	UIFile out;
-
-	Teleport teleport;
-	try {
-		UI::save ( &teleport, out, "unsaveable" );
-		CHECK ( false );
-	} catch ( UIException &exc ) {
-		CHECK ( exc.what() );
-	}
-}
+    UIFile out;
+
+    Teleport teleport;
+    try {
+        UI::save ( &teleport, out, "unsaveable" );
+        CHECK ( false );
+    } catch ( UIException &exc ) {
+        CHECK ( exc.what() );
+    }
+}
