Index: library/tests/epdf_harness.cpp
===================================================================
--- library/tests/epdf_harness.cpp (revision 713)
+++ library/tests/epdf_harness.cpp (revision 722)
@@ -28,10 +28,10 @@
 	UI::get ( variance, set, "variance", UI::compulsory );
 
-	UI::get (support, set, "support", UI::optional );
-	UI::get (nbins, set, "nbins", UI::optional );
-	UI::get (nsamples, set, "nsamples", UI::optional );
-	UI::get (R, set, "R", UI::optional );
-
-	mrv = UI::build<RV> (set, "marginal_rv", UI::optional );
+	UI::get ( support, set, "support", UI::optional );
+	UI::get ( nbins, set, "nbins", UI::optional );
+	UI::get ( nsamples, set, "nsamples", UI::optional );
+	UI::get ( R, set, "R", UI::optional );
+
+	mrv = UI::build<RV> ( set, "marginal_rv", UI::optional );
 
 	UI::get ( tolerance, set, "tolerance", UI::optional );
@@ -74,19 +74,19 @@
 		mprod mEp ( aa );
 
-		check_cond_mean(mEp);
+		check_cond_mean ( mEp );
 		if ( R.rows() > 0 ) {
-			check_cond_covariance( mEp );
+			check_cond_covariance ( mEp );
 		}
 
 		// test of pdflog at zero
 		vec zero ( 0 );
-		vec zeron=zeros ( hepdf->dimension() );
+		vec zeron = zeros ( hepdf->dimension() );
 
 		double lpz = hepdf->evallog ( zeron );
-		double lpzc=mEp.evallogcond ( zeron, zero );
+		double lpzc = mEp.evallogcond ( zeron, zero );
 		CHECK_CLOSE_EX ( lpz, lpzc, tolerance );
 
-		vec lpzv(1);
-		lpzv(0) = lpz;
+		vec lpzv ( 1 );
+		lpzv ( 0 ) = lpz;
 
 		mat zero1n ( hepdf->dimension(), 1 );
@@ -98,9 +98,9 @@
 		CHECK_CLOSE_EX ( lpzv, lpzv_act, tolerance );
 
-		Array<vec> zeroa(3);
-		lpzv = vec( zeroa.size() );
+		Array<vec> zeroa ( 3 );
+		lpzv = vec ( zeroa.size() );
 		for ( int i = 0; i < zeroa.size(); ++i ) {
-			zeroa(i) = zeron;
-			lpzv(i) = lpz;
+			zeroa ( i ) = zeron;
+			lpzv ( i ) = lpz;
 		}
 
@@ -115,20 +115,20 @@
 
 	int tc = 0;
-	Array<vec> actual(CurrentContext::max_trial_count);
+	Array<vec> actual ( CurrentContext::max_trial_count );
 	do {
 		vec emu = num_mean2 ( hepdf.get(), xb, yb, nbins ( 0 ), nbins ( 1 ) );
-		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;
-		stream << CurrentContext::format_context(__LINE__) << "expected " << mean << " +/- " << tolerance << " but was " << actual;
-
-		UnitTest::TestDetails details(*UnitTest::CurrentTest::Details(), 0, false);
-
-		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
-       }
+		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;
+		stream << CurrentContext::format_context ( __LINE__ ) << "expected " << mean << " +/- " << tolerance << " but was " << actual;
+
+		UnitTest::TestDetails details ( *UnitTest::CurrentTest::Details(), 0, false );
+
+		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
+	}
 }
 
@@ -138,20 +138,20 @@
 
 	int tc = 0;
-	Array<double> actual(CurrentContext::max_trial_count);
+	Array<double> actual ( CurrentContext::max_trial_count );
 	do {
 		double nc = normcoef ( hepdf.get(), xb, yb, nbins ( 0 ), nbins ( 1 ) );
-		actual( tc ) = nc;
-		++tc;
-	} while ( ( tc < CurrentContext::max_trial_count ) &&
-		  !UnitTest::AreClose ( 1.0, actual( tc - 1 ), tolerance ) );
-	if ( ( tc == CurrentContext::max_trial_count ) &&
-	     ( !UnitTest::AreClose ( 1.0, actual( CurrentContext::max_trial_count - 1 ), tolerance ) ) ) {
-		UnitTest::MemoryOutStream stream;
-		stream << CurrentContext::format_context(__LINE__) << "expected " << mean << " +/- " << tolerance << " but was " << actual;
-
-		UnitTest::TestDetails details(*UnitTest::CurrentTest::Details(), 0, false);
-
-		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
-       }
+		actual ( tc ) = nc;
+		++tc;
+	} while ( ( tc < CurrentContext::max_trial_count ) &&
+	          !UnitTest::AreClose ( 1.0, actual ( tc - 1 ), tolerance ) );
+	if ( ( tc == CurrentContext::max_trial_count ) &&
+	        ( !UnitTest::AreClose ( 1.0, actual ( CurrentContext::max_trial_count - 1 ), tolerance ) ) ) {
+		UnitTest::MemoryOutStream stream;
+		stream << CurrentContext::format_context ( __LINE__ ) << "expected " << mean << " +/- " << tolerance << " but was " << actual;
+
+		UnitTest::TestDetails details ( *UnitTest::CurrentTest::Details(), 0, false );
+
+		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
+	}
 }
 
@@ -160,90 +160,90 @@
 
 	int tc = 0;
-	Array<vec> actual(CurrentContext::max_trial_count);
+	Array<vec> actual ( CurrentContext::max_trial_count );
 	do {
 		mat smp = hepdf->sample_mat ( nsamples );
 		vec emu = smp * ones ( nsamples ) / nsamples;
-		actual( tc ) = emu;
-		++tc;
-	} while ( ( tc < CurrentContext::max_trial_count ) &&
-		  !UnitTest::AreClose ( mean, actual( tc - 1 ), delta ) );
-	if ( ( tc == CurrentContext::max_trial_count ) &&
-	     ( !UnitTest::AreClose ( mean, actual( CurrentContext::max_trial_count - 1 ), delta ) ) ) {
-		UnitTest::MemoryOutStream stream;
-		stream << CurrentContext::format_context(__LINE__) << "expected " << mean << " +/- " << delta << " but was " << actual;
-
-		UnitTest::TestDetails details(*UnitTest::CurrentTest::Details(), 0, false);
-
-		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
-       }
+		actual ( tc ) = emu;
+		++tc;
+	} while ( ( tc < CurrentContext::max_trial_count ) &&
+	          !UnitTest::AreClose ( mean, actual ( tc - 1 ), delta ) );
+	if ( ( tc == CurrentContext::max_trial_count ) &&
+	        ( !UnitTest::AreClose ( mean, actual ( CurrentContext::max_trial_count - 1 ), delta ) ) ) {
+		UnitTest::MemoryOutStream stream;
+		stream << CurrentContext::format_context ( __LINE__ ) << "expected " << mean << " +/- " << delta << " but was " << actual;
+
+		UnitTest::TestDetails details ( *UnitTest::CurrentTest::Details(), 0, false );
+
+		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
+	}
 }
 
 void epdf_harness::check_covariance() {
 	int tc = 0;
-	Array<mat> actual(CurrentContext::max_trial_count);
+	Array<mat> actual ( CurrentContext::max_trial_count );
 	do {
 		mat smp = hepdf->sample_mat ( nsamples );
 		vec emu = smp * ones ( nsamples ) / 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;
-		stream << CurrentContext::format_context(__LINE__) << "expected " << R << " +/- " << tolerance << " but was " << actual;
-
-		UnitTest::TestDetails details(*UnitTest::CurrentTest::Details(), 0, false);
-
-		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
-       }
-}
-
-void epdf_harness::check_cond_mean( mprod &mep ) {
+		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;
+		stream << CurrentContext::format_context ( __LINE__ ) << "expected " << R << " +/- " << tolerance << " but was " << actual;
+
+		UnitTest::TestDetails details ( *UnitTest::CurrentTest::Details(), 0, false );
+
+		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
+	}
+}
+
+void epdf_harness::check_cond_mean ( mprod &mep ) {
 	vec delta = make_close_tolerance ( variance, nsamples );
 
 	int tc = 0;
-	Array<vec> actual(CurrentContext::max_trial_count);
+	Array<vec> actual ( CurrentContext::max_trial_count );
 	do {
 		mat smp = mep.samplecond_mat ( vec ( 0 ), nsamples );
 		vec emu = sum ( smp, 2 ) / nsamples;
-		actual( tc ) = emu;
-		++tc;
-	} while ( ( tc < CurrentContext::max_trial_count ) &&
-		  !UnitTest::AreClose ( mean, actual( tc - 1 ), delta ) );
-	if ( ( tc == CurrentContext::max_trial_count ) &&
-	     ( !UnitTest::AreClose ( mean, actual( CurrentContext::max_trial_count - 1 ), delta ) ) ) {
-		UnitTest::MemoryOutStream stream;
-		stream << CurrentContext::format_context(__LINE__) << "expected " << mean << " +/- " << delta << " but was " << actual;
-
-		UnitTest::TestDetails details(*UnitTest::CurrentTest::Details(), 0, false);
-
-		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
-       }
-}
-
-void epdf_harness::check_cond_covariance( mprod &mep ) {
-	int tc = 0;
-	Array<mat> actual(CurrentContext::max_trial_count);
+		actual ( tc ) = emu;
+		++tc;
+	} while ( ( tc < CurrentContext::max_trial_count ) &&
+	          !UnitTest::AreClose ( mean, actual ( tc - 1 ), delta ) );
+	if ( ( tc == CurrentContext::max_trial_count ) &&
+	        ( !UnitTest::AreClose ( mean, actual ( CurrentContext::max_trial_count - 1 ), delta ) ) ) {
+		UnitTest::MemoryOutStream stream;
+		stream << CurrentContext::format_context ( __LINE__ ) << "expected " << mean << " +/- " << delta << " but was " << actual;
+
+		UnitTest::TestDetails details ( *UnitTest::CurrentTest::Details(), 0, false );
+
+		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
+	}
+}
+
+void epdf_harness::check_cond_covariance ( mprod &mep ) {
+	int tc = 0;
+	Array<mat> actual ( CurrentContext::max_trial_count );
 	do {
 		mat smp = mep.samplecond_mat ( vec ( 0 ), 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;
-		stream << CurrentContext::format_context(__LINE__) << "expected " << mean << " +/- " << tolerance << " but was " << actual;
-
-		UnitTest::TestDetails details(*UnitTest::CurrentTest::Details(), 0, false);
-
-		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
-       }
-}
-
-}
+		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;
+		stream << CurrentContext::format_context ( __LINE__ ) << "expected " << mean << " +/- " << tolerance << " but was " << actual;
+
+		UnitTest::TestDetails details ( *UnitTest::CurrentTest::Details(), 0, false );
+
+		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
+	}
+}
+
+}
Index: library/tests/mat_checks.cpp
===================================================================
--- library/tests/mat_checks.cpp (revision 706)
+++ library/tests/mat_checks.cpp (revision 722)
@@ -68,10 +68,10 @@
 }
 
-std::string CurrentContext::format_context(int ln) {
+std::string CurrentContext::format_context ( int ln ) {
 	std::stringstream ss;
 	ss << "error at " << config_name << '[' << index << ']';
 
 	if ( ln >= 0 ) {
-    		ss << ", harness line " << ln;
+		ss << ", harness line " << ln;
 	}
 
Index: library/tests/pdf_harness.h
===================================================================
--- library/tests/pdf_harness.h (revision 706)
+++ library/tests/pdf_harness.h (revision 722)
@@ -52,5 +52,5 @@
 	void check_covariance();
 };
-UIREGISTER(pdf_harness);
+UIREGISTER ( pdf_harness );
 
 }
Index: library/tests/epdf_harness.h
===================================================================
--- library/tests/epdf_harness.h (revision 706)
+++ library/tests/epdf_harness.h (revision 722)
@@ -69,10 +69,10 @@
 
 	// assumes marginal_rv is valid
-	void check_cond_mean( mprod &mep );
+	void check_cond_mean ( mprod &mep );
 
 	// assumes marginal_rv and R are valid
-	void check_cond_covariance( mprod &mep );
+	void check_cond_covariance ( mprod &mep );
 };
-UIREGISTER(epdf_harness);
+UIREGISTER ( epdf_harness );
 
 }
Index: library/tests/mat_checks.h
===================================================================
--- library/tests/mat_checks.h (revision 706)
+++ library/tests/mat_checks.h (revision 722)
@@ -81,5 +81,5 @@
 	   __LINE__ (and it is included in the returned string).
 	*/
-	static std::string format_context( int ln = -1 );
+	static std::string format_context ( int ln = -1 );
 
 	template<typename Expected, typename Actual>
Index: library/tests/testsuite/arx_straux_test.cpp
===================================================================
--- library/tests/testsuite/arx_straux_test.cpp (revision 717)
+++ library/tests/testsuite/arx_straux_test.cpp (revision 722)
@@ -8,17 +8,19 @@
 	UIFile F ( "arx_straux_test.cfg" );
 
-	Setting &tests=F.getRoot() ["tests"];
-	for ( int i=0;i<tests.getLength(); i++ ) {
+	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 );
+		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() ) );
 
 
@@ -27,5 +29,5 @@
 		int nrep = 5;         // nrep: number of random repetions of structure estimation
 		double lambda   = 0.9;
-		int k=2;
+		int k = 2;
 
 //[strout, rgrsout, statistics] =
@@ -33,5 +35,5 @@
 //          order_k);
 		Array<str_aux> o2;
-		ivec o1 = straux1 ( Ld1,20, Ld0, 10,  belief, nbest, nrep, lambda, k, o2 );
+		ivec o1 = straux1 ( Ld1, 20, Ld0, 10,  belief, nbest, nrep, lambda, k, o2 );
 
 //o1 is messed up in matlab's straux
Index: library/tests/testsuite/emix_test.cpp
===================================================================
--- library/tests/testsuite/emix_test.cpp (revision 721)
+++ library/tests/testsuite/emix_test.cpp (revision 722)
@@ -13,5 +13,5 @@
 static void check_mean ( emix &distrib_obj, int nsamples, const vec &mean, double tolerance );
 
-static void check_covariance ( emix &distrib_obj, int nsamples, const mat &R, double tolerance);
+static void check_covariance ( emix &distrib_obj, int nsamples, const mat &R, double tolerance );
 
 TEST ( emix_test ) {
@@ -46,6 +46,6 @@
 	pdf_ptr Ac = E1->condition ( y );
 
-	mlnorm<ldmat> *wacnd = dynamic_cast<mlnorm<ldmat> *>( Ac.get() );
-	CHECK(wacnd);
+	mlnorm<ldmat> *wacnd = dynamic_cast<mlnorm<ldmat> *> ( Ac.get() );
+	CHECK ( wacnd );
 	if ( wacnd ) {
 		CHECK_CLOSE ( mat ( "-0.349953" ), wacnd->_A(), epsilon );
@@ -83,5 +83,5 @@
 
 	mat observedR ( "0.740142 -0.259015; -0.259015 1.0302" );
-	check_covariance ( M2, N, observedR, 2.0);
+	check_covariance ( M2, N, observedR, 2.0 );
 
 	epdf_ptr Mg = M2.marginal ( y );
@@ -97,16 +97,16 @@
 static void check_mean ( emix &distrib_obj, int nsamples, const vec &mean, double tolerance ) {
 	int tc = 0;
-	Array<vec> actual(CurrentContext::max_trial_count);
+	Array<vec> actual ( CurrentContext::max_trial_count );
 	do {
 		mat smp = distrib_obj.sample_mat ( nsamples );
 		vec emu = sum ( smp, 2 ) / nsamples;
-		actual( tc ) = emu;
+		actual ( tc ) = emu;
 		++tc;
 	} while ( ( tc < CurrentContext::max_trial_count ) &&
-		  !UnitTest::AreClose ( mean, actual( tc - 1 ), tolerance ) );
+	          !UnitTest::AreClose ( mean, actual ( tc - 1 ), tolerance ) );
 	if ( ( tc == CurrentContext::max_trial_count ) &&
-	     ( !UnitTest::AreClose ( mean, actual( CurrentContext::max_trial_count - 1 ), tolerance ) ) ) {
+	        ( !UnitTest::AreClose ( mean, actual ( CurrentContext::max_trial_count - 1 ), tolerance ) ) ) {
 		UnitTest::MemoryOutStream stream;
-		UnitTest::TestDetails details(*UnitTest::CurrentTest::Details(), __LINE__);
+		UnitTest::TestDetails details ( *UnitTest::CurrentTest::Details(), __LINE__ );
 		stream << "Expected " << mean << " +/- " << tolerance << " but was " << actual;
 
@@ -115,22 +115,22 @@
 }
 
-static void check_covariance ( emix &distrib_obj, int nsamples, const mat &R, double tolerance) {
+static void check_covariance ( emix &distrib_obj, int nsamples, const mat &R, double tolerance ) {
 	int tc = 0;
-	Array<mat> actual(CurrentContext::max_trial_count);
+	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;
+		actual ( tc ) = er;
 		++tc;
 	} while ( ( tc < CurrentContext::max_trial_count ) &&
-		  !UnitTest::AreClose ( R, actual( tc - 1 ), tolerance ) );
+	          !UnitTest::AreClose ( R, actual ( tc - 1 ), tolerance ) );
 	if ( ( tc == CurrentContext::max_trial_count ) &&
-	     ( !UnitTest::AreClose ( R, actual( CurrentContext::max_trial_count - 1 ), tolerance ) ) ) {
+	        ( !UnitTest::AreClose ( R, actual ( CurrentContext::max_trial_count - 1 ), tolerance ) ) ) {
 		UnitTest::MemoryOutStream stream;
-		UnitTest::TestDetails details(*UnitTest::CurrentTest::Details(), __LINE__);
+		UnitTest::TestDetails details ( *UnitTest::CurrentTest::Details(), __LINE__ );
 		stream << "Expected " << R << " +/- " << tolerance << " but was " << actual;
 
 		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
-       }
+	}
 }
Index: library/tests/testsuite/epdf_test.cpp
===================================================================
--- library/tests/testsuite/epdf_test.cpp (revision 717)
+++ library/tests/testsuite/epdf_test.cpp (revision 722)
@@ -76,5 +76,5 @@
 }
 
-TEST(dirich_test){
+TEST ( dirich_test ) {
 	epdf_harness::test_config ( "edirich.cfg" );
 }
Index: library/tests/testsuite/rv_test.cpp
===================================================================
--- library/tests/testsuite/rv_test.cpp (revision 717)
+++ library/tests/testsuite/rv_test.cpp (revision 722)
@@ -8,5 +8,5 @@
 TEST ( rv_test ) {
 	RV::clear_all();
-	
+
 	RV a = RV ( "{a_in_test_rv }", "3" );
 	CHECK ( a.equal ( a ) );
@@ -133,24 +133,26 @@
 		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_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
+	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
 
 	//test if unique names work
-	RV uniq1("y",1);
-	RV uniq2("y",1);
-	
-	CHECK_EQUAL(uniq1.id(0), uniq2.id(0));
-	
+	RV uniq1 ( "y", 1 );
+	RV uniq2 ( "y", 1 );
+
+	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_EQUAL ( "a_in_test_rv_2", abc.scalarname ( 2 ) );
+	CHECK_EQUAL ( "b_in_test_rv_0", abc.scalarname ( 3 ) );
 }
Index: library/tests/testsuite/randun_test.cpp
===================================================================
--- library/tests/testsuite/randun_test.cpp (revision 717)
+++ library/tests/testsuite/randun_test.cpp (revision 722)
@@ -5,13 +5,13 @@
 using namespace itpp;
 
- TEST(test_randun) {
+TEST ( test_randun ) {
 	// 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";
+	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);
- }
+	vec x = randun ( 10 );
+	CHECK_CLOSE ( matlab_out, x, 1e-6 );
+}
 
Index: library/tests/testsuite/datasource_test.cpp
===================================================================
--- library/tests/testsuite/datasource_test.cpp (revision 717)
+++ library/tests/testsuite/datasource_test.cpp (revision 722)
@@ -7,68 +7,69 @@
 
 TEST ( EpdfDS_test ) {
-	UIFile uif("epdfds.cfg");
+	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++){
+	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);
+		ds->getdata ( dt );
 		mean += dt;
 	}
-	CHECK_CLOSE_EX (  vec_2(1.0,2.0) ,mean/100, 1e-2);
+	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);
-	
-	vec dt = zeros(2);
-	vec ut="1.0";
-	ds->write(ut);
-	for (int i=0; i<100; i++){
+	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);
+	ds->getdata ( dt );
+	CHECK_CLOSE ( -0.2 , dt ( 0 ), 1e-4 );
 
-	ut="2.0";
-	ds->write(ut);
-	for (int i=0; i<100; i++){
+	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);
+	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);
-	
+TEST ( StateDS_test ) {
+	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->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->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.set_parameters ( IM, OM );
 	sds.validate();
-	
-	for (int t=1; t<10;t++){
-		sds.write(vec_1(double(t)));
+
+	for ( int t = 1; t < 10; t++ ) {
+		sds.write ( vec_1 ( double ( t ) ) );
 		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 721)
+++ library/tests/testsuite/testsuite.cpp (revision 722)
@@ -5,68 +5,21 @@
 #include "itpp_ext.h"
 #include <string.h>
+#include "../general_suite.h"
 
-using std::cout;
-using std::cerr;
-using std::endl;
-
-using namespace itpp;
-
-Array<const char *> selected_tests;
-
-bool is_selected_test ( const UnitTest::Test *test ) {
-	bdm_assert_debug ( test, "NULL test" );
-
-	if ( !selected_tests.length() ) {
-		return true;
-	}
-
-	for ( int i = 0; i < selected_tests.length(); ++i ) {
-		const char *n = test->m_details.testName;
-		bdm_assert_debug ( n, "NULL test name" );
-		const char *sname = selected_tests ( i );
-		bdm_assert_debug ( sname, "NULL selected test name" );
-		if ( !strcmp ( n, sname ) ) {
-			return true;
-		}
-	}
-
-	return false;
-}
+using namespace UnitTest;
 
 int main ( int argc, char const *argv[] ) {
 	if ( argc > 1 ) {
-		if ( !strcmp ( argv[1], "print" ) ) {
-			UnitTest::Test* curTest = UnitTest::Test::GetTestList().GetHead();
-
-			while ( curTest != 0 ) {
-				const char *n = curTest->m_details.testName;
-				printf ( "%s\n", n );
-				curTest = curTest->next;
-			}
-			return 0;
-		} else {
-			selected_tests.set_length ( argc - 1 );
-			const char **param = argv + 1;
-			int i = 0;
-			while ( *param ) {
-				selected_tests ( i ) = *param;
-				++i;
-				++param;
-			}
-		}
+		if ( !strcmp ( argv[1], "print" ) )
+			print_test_list();
+		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 
+		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;
 	}
 
-	itpp::RNG_randomize();
-
-	UnitTest::TestReporterStdout reporter;
-	UnitTest::TestRunner runner ( reporter );
-	return runner.RunTestsIf ( UnitTest::Test::GetTestList(),
-	                           0,
-	                           is_selected_test,
-	                           0 );
+	return run_selected_tests();
 }
Index: library/tests/testsuite/egiw_test.cpp
===================================================================
--- library/tests/testsuite/egiw_test.cpp (revision 717)
+++ library/tests/testsuite/egiw_test.cpp (revision 722)
@@ -45,13 +45,13 @@
 	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()));
+	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()));
+		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 717)
+++ library/tests/testsuite/shared_ptr_test.cpp (revision 722)
@@ -93,5 +93,5 @@
 	bdm::shared_ptr<Foo> empty;
 	try {
-		Foo x(*empty);
+		Foo x ( *empty );
 		CHECK ( false );
 	} catch ( std::runtime_error &exc ) {
Index: library/tests/testsuite/rectangular_support_test.cpp
===================================================================
--- library/tests/testsuite/rectangular_support_test.cpp (revision 717)
+++ library/tests/testsuite/rectangular_support_test.cpp (revision 722)
@@ -20,6 +20,6 @@
 	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/logger_test.cpp
===================================================================
--- library/tests/testsuite/logger_test.cpp (revision 721)
+++ library/tests/testsuite/logger_test.cpp (revision 722)
@@ -22,5 +22,5 @@
 	}
 
-	int sz = static_cast<int>(st.st_size);
+	int sz = static_cast<int> ( st.st_size );
 	if ( sz != st.st_size ) {
 		std::string msg = fname;
Index: library/tests/testsuite/merger_test.cpp
===================================================================
--- library/tests/testsuite/merger_test.cpp (revision 717)
+++ library/tests/testsuite/merger_test.cpp (revision 722)
@@ -47,93 +47,93 @@
 
 	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);
+	             "-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);
+	             "-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);
+	             "-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 );
 }
 
@@ -142,5 +142,5 @@
 
 	shared_ptr<merger_base> mb =
-		UI::build<merger_base> ( in, "Merger", UI::compulsory );
+	    UI::build<merger_base> ( in, "Merger", UI::compulsory );
 
 	pdf_array sources;
@@ -148,7 +148,7 @@
 	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();
Index: library/tests/testsuite/LQG_test.cpp
===================================================================
--- library/tests/testsuite/LQG_test.cpp (revision 717)
+++ library/tests/testsuite/LQG_test.cpp (revision 722)
@@ -5,52 +5,52 @@
 using namespace bdm;
 
-TEST(LQG_test) {
+TEST ( LQG_test ) {
 	LQG reg;
-	shared_ptr<StateSpace<fsqmat> > stsp=new StateSpace<fsqmat>;
+	shared_ptr<StateSpace<fsqmat> > stsp = new StateSpace<fsqmat>;
 	// 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
+	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.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);
+	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) {
+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));
-	
-	shared_ptr<StateCanonical > Stsp=new StateCanonical;
-	Stsp->connect_mlnorm(ml);
-	
-	/* results from 
+	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 );
+
+	/* 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);
+	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) {
+TEST ( to_state_arx_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));
-	
-	shared_ptr<StateFromARX> Stsp=new StateFromARX;
-	Stsp->connect_mlnorm(ml);
-	
-	/* results from 
+	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<StateFromARX> Stsp = new StateFromARX;
+	Stsp->connect_mlnorm ( ml );
+
+	/* results from
 	[A,B,C,D]=tf2ss([2.3 0],[1 -1.1])
 	*/
@@ -58,29 +58,29 @@
 }
 
-TEST(arx_LQG_test){
+TEST ( arx_LQG_test ) {
 	mlnorm<fsqmat> ml;
-	mat A="1.81, -.8189, .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(-2));
-	rgr.add(ur.copy_t(-1));
-	
-	ml.set_rv(yr);
-	ml.set_rvc(rgr);
+	mat A = "1.81, -.8189, .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 ( -2 ) );
+	rgr.add ( ur.copy_t ( -1 ) );
+
+	ml.set_rv ( yr );
+	ml.set_rvc ( rgr );
 	ml.validate();
-	
-	shared_ptr<StateCanonical > Stsp=new StateCanonical;
-	Stsp->connect_mlnorm(ml);
-	
+
+	shared_ptr<StateCanonical > Stsp = new StateCanonical;
+	Stsp->connect_mlnorm ( ml );
+
 	LQG L;
-	L.set_system(Stsp);
-	L.set_control_parameters(eye(1), eye(1), vec_1(0.0), 100);
+	L.set_system ( Stsp );
+	L.set_control_parameters ( eye ( 1 ), eye ( 1 ), vec_1 ( 0.0 ), 100 );
 	L.validate();
-	
+
 	L.redesign();
-	cout << L.to_string()<<endl;
+	cout << L.to_string() << endl;
 }
Index: library/tests/testsuite/datalink_test.cpp
===================================================================
--- library/tests/testsuite/datalink_test.cpp (revision 717)
+++ library/tests/testsuite/datalink_test.cpp (revision 722)
@@ -91,18 +91,18 @@
 	RV a = RV ( "{dl_a }" );
 	RV b = RV ( "{dlb }" );
-	RV ab=concat(a,b);
+	RV ab = concat ( a, b );
 	RV aa = a;
-	a.t_plus(-1);
-	aa.add(a); 
+	a.t_plus ( -1 );
+	aa.add ( a );
 
-	
+
 	datalink_buffered dl;
-	dl.set_connection ( concat(aa,b), ab);
+	dl.set_connection ( concat ( aa, b ), ab );
 
 	vec val_up ( "1 2" );
-	dl.step(val_up);
-	val_up="3 4";
-	
-	
+	dl.step ( val_up );
+	val_up = "3 4";
+
+
 	vec p = dl.pushdown ( val_up );
 	vec exp_p = " 3, 1, 4 ";
Index: library/tests/testsuite/user_info_test.cpp
===================================================================
--- library/tests/testsuite/user_info_test.cpp (revision 721)
+++ library/tests/testsuite/user_info_test.cpp (revision 722)
@@ -33,5 +33,5 @@
 	}
 
-string to_string()  const {
+	string to_string()  const {
 		return name;
 	}
@@ -61,5 +61,5 @@
 	}
 
-string to_string()  const {
+	string to_string()  const {
 		stringstream stream;
 		stream << number;
@@ -77,9 +77,9 @@
 	string manufacturer;
 
-	Transport() : year( 1900 ), manufacturer( "unknown" ) {
+	Transport() : year ( 1900 ), manufacturer ( "unknown" ) {
 	}
 
 	Transport ( int year, string manufacturer ) :
-		year ( year ), manufacturer ( manufacturer ) {
+			year ( year ), manufacturer ( manufacturer ) {
 	}
 
@@ -128,5 +128,5 @@
 	}
 
-string to_string()  const {
+	string to_string()  const {
 		stringstream stream;
 		stream << "A car made in " << year << " by " << manufacturer << ", having " << kilometers << " kilometers on the clock.";
@@ -163,5 +163,5 @@
 		int elights;
 		if ( UI::get ( elights, set, "electricLights", UI::optional ) ) {
-		    electricLights = !!elights;
+			electricLights = !!elights;
 		}
 
@@ -178,5 +178,5 @@
 	}
 
-string to_string()  const {
+	string to_string()  const {
 		stringstream stream;
 		stream << "a bike made in " << year << " by " << manufacturer;
Index: library/tests/stresssuite/arx_elem_stress.cpp
===================================================================
--- library/tests/stresssuite/arx_elem_stress.cpp (revision 721)
+++ library/tests/stresssuite/arx_elem_stress.cpp (revision 722)
@@ -11,5 +11,5 @@
 	ARX Ar;
 	Ar.set_statistics ( 1, V0, -1.0 );
-	Ar.set_constant(true);
+	Ar.set_constant ( true );
 	Ar.validate();
 
Index: library/tests/stresssuite/particle_stress.cpp
===================================================================
--- library/tests/stresssuite/particle_stress.cpp (revision 721)
+++ library/tests/stresssuite/particle_stress.cpp (revision 722)
@@ -37,5 +37,5 @@
 
 	ivec ind;
-	emp.resample(ind);
+	emp.resample ( ind );
 
 	cout << ind << endl;
Index: library/tests/stresssuite/kalman_stress.cpp
===================================================================
--- library/tests/stresssuite/kalman_stress.cpp (revision 721)
+++ library/tests/stresssuite/kalman_stress.cpp (revision 722)
@@ -63,5 +63,5 @@
 	KF.set_parameters ( A, B, C, D, chmat ( Q ), chmat ( R ) );
 	KF.set_statistics ( mu0, chmat ( P0 ) ); //prediction!
-	KF.set_evalll(false);
+	KF.set_evalll ( false );
 	KF.validate();
 	const epdf& KFep = KF.posterior();
@@ -71,7 +71,7 @@
 	// FULL
 	KalmanFull KF2;
-	KF2.set_parameters( A, B, C, D,  Q, R);
-	KF2.set_statistics(  mu0, P0 );
-	KF2.set_evalll(false);
+	KF2.set_parameters ( A, B, C, D,  Q, R );
+	KF2.set_statistics ( mu0, P0 );
+	KF2.set_evalll ( false );
 	KF2.validate();
 	mat Xt2 ( dimx, Ndat );
@@ -85,5 +85,5 @@
 	KFE.set_parameters ( fxu, hxu, Q, R );
 	KFE.set_statistics ( mu0, chmat ( P0 ) );
-	KFE.set_evalll(false);
+	KFE.set_evalll ( false );
 	KFE.validate();
 	const epdf& KFEep = KFE.posterior();
@@ -98,6 +98,6 @@
 	tt.tic();
 	for ( int t = 1; t < Ndat; t++ ) {
-		dt = Dt.get_col(t);
-		KF.bayes ( dt.get(0,C.rows()-1), dt.get(C.rows(), dt.length()-1) );
+		dt = Dt.get_col ( t );
+		KF.bayes ( dt.get ( 0, C.rows() - 1 ), dt.get ( C.rows(), dt.length() - 1 ) );
 		Xt.set_col ( t, KFep.mean() );
 	}
@@ -106,6 +106,6 @@
 	tt.tic();
 	for ( int t = 1; t < Ndat; t++ ) {
-		dt = Dt.get_col(t);
-		KF2.bayes ( dt.get(0,C.rows()-1), dt.get(C.rows(), dt.length()-1) );
+		dt = Dt.get_col ( t );
+		KF2.bayes ( dt.get ( 0, C.rows() - 1 ), dt.get ( C.rows(), dt.length() - 1 ) );
 		Xt2.set_col ( t, KF2.posterior().mean() );
 	}
@@ -114,6 +114,6 @@
 	tt.tic();
 	for ( int t = 1; t < Ndat; t++ ) {
-		dt = Dt.get_col(t);
-		KFE.bayes ( dt.get(0,C.rows()-1), dt.get(C.rows(), dt.length()-1) );
+		dt = Dt.get_col ( t );
+		KFE.bayes ( dt.get ( 0, C.rows() - 1 ), dt.get ( C.rows(), dt.length() - 1 ) );
 		XtE.set_col ( t, KFEep.mean() );
 	}
Index: library/tests/stresssuite/kalman_QR_stress.cpp
===================================================================
--- library/tests/stresssuite/kalman_QR_stress.cpp (revision 721)
+++ library/tests/stresssuite/kalman_QR_stress.cpp (revision 722)
@@ -70,6 +70,6 @@
 	KF_QR.set_parameters ( &evolQR, &evolQR, 100 );
 	evolQR.condition ( "1 1 1" );
-	egamma kfinit=egamma("10 10 10","1 1 1");
-	KF_QR.set_statistics ( egamma("10 10 10","1 1 1"), &KF );
+	egamma kfinit = egamma ( "10 10 10", "1 1 1" );
+	KF_QR.set_statistics ( egamma ( "10 10 10", "1 1 1" ), &KF );
 	const epdf& mpost = KF_QR.posterior();
 	const epdf& mposttr = KFtr.posterior();
Index: library/tests/stresssuite/resample_stress.cpp
===================================================================
--- library/tests/stresssuite/resample_stress.cpp (revision 721)
+++ library/tests/stresssuite/resample_stress.cpp (revision 722)
@@ -38,5 +38,5 @@
 
 	ivec ind;
-	emp.resample(ind);
+	emp.resample ( ind );
 
 	cout << ind << endl;
Index: library/tests/stresssuite/size_generator.cpp
===================================================================
--- library/tests/stresssuite/size_generator.cpp (revision 717)
+++ library/tests/stresssuite/size_generator.cpp (revision 722)
@@ -5,7 +5,7 @@
 using bdm::UI;
 
-void size_generator::from_setting(const Setting &set) {
-	UI::get( sz, set, "size", UI::optional );
-	UI::get( step, set, "step", UI::optional );
+void size_generator::from_setting ( const Setting &set ) {
+	UI::get ( sz, set, "size", UI::optional );
+	UI::get ( step, set, "step", UI::optional );
 }
 
Index: library/tests/stresssuite/mixtures_stress.cpp
===================================================================
--- library/tests/stresssuite/mixtures_stress.cpp (revision 721)
+++ library/tests/stresssuite/mixtures_stress.cpp (revision 722)
@@ -101,5 +101,5 @@
 	// Add ones for constant coefficients
 	mat Data = concat_vertical ( Smp, ones ( 1, Smp.cols() ) );
-	Post.bayes ( Data , empty_vec);
+	Post.bayes ( Data , empty_vec );
 
 	cout << "Posterior mixture:" << endl;
Index: library/tests/stresssuite/arx_stress.cpp
===================================================================
--- library/tests/stresssuite/arx_stress.cpp (revision 721)
+++ library/tests/stresssuite/arx_stress.cpp (revision 722)
@@ -29,5 +29,5 @@
 	ARX Ar;
 	Ar.set_statistics ( 1, V0, nu0 );               // Estimator
-	Ar.set_constant(false);
+	Ar.set_constant ( false );
 	Ar.validate();
 	const epdf& f_thr = Ar.posterior();          // refrence to posterior of the estimator
@@ -52,5 +52,5 @@
 		Yt ( t ) = th * rgr + sqr * NorRNG();
 
-		Ar.bayes ( vec_1(Yt(t)), rgr );             // Bayes rule
+		Ar.bayes ( vec_1 ( Yt ( t ) ), rgr );       // Bayes rule
 
 		// Build predictor
Index: library/tests/stresssuite/stresssuite.cpp
===================================================================
--- library/tests/stresssuite/stresssuite.cpp (revision 721)
+++ library/tests/stresssuite/stresssuite.cpp (revision 722)
@@ -5,68 +5,21 @@
 #include "itpp_ext.h"
 #include <string.h>
+#include "../general_suite.h"
 
-using std::cout;
-using std::cerr;
-using std::endl;
-
-using namespace itpp;
-
-Array<const char *> selected_tests;
-
-bool is_selected_test ( const UnitTest::Test *test ) {
-	bdm_assert_debug ( test, "NULL test" );
-
-	if ( !selected_tests.length() ) {
-		return true;
-	}
-
-	for ( int i = 0; i < selected_tests.length(); ++i ) {
-		const char *n = test->m_details.testName;
-		bdm_assert_debug ( n, "NULL test name" );
-		const char *sname = selected_tests ( i );
-		bdm_assert_debug ( sname, "NULL selected test name" );
-		if ( !strcmp ( n, sname ) ) {
-			return true;
-		}
-	}
-
-	return false;
-}
+using namespace UnitTest;
 
 int main ( int argc, char const *argv[] ) {
 	if ( argc > 1 ) {
-		if ( !strcmp ( argv[1], "print" ) ) {
-			UnitTest::Test* curTest = UnitTest::Test::GetTestList().GetHead();
-
-			while ( curTest != 0 ) {
-				const char *n = curTest->m_details.testName;
-				printf ( "%s\n", n );
-				curTest = curTest->next;
-			}
-			return 0;
-		} else {
-			selected_tests.set_length ( argc - 1 );
-			const char **param = argv + 1;
-			int i = 0;
-			while ( *param ) {
-				selected_tests ( i ) = *param;
-				++i;
-				++param;
-			}
-		}
+		if ( !strcmp ( argv[1], "print" ) )
+			print_test_list();
+		else
+			pick_selected_tests ( argc, argv );
 	} else {
-		cout << endl << "STRESSSUITE - a program covering all BDM stress tests." << endl << endl 
-		     << argv[0] << " ....................................... run all stress tests" << endl 
-		     << argv[0] << " particular_test_1 particular_test_2 ... run selected stress tests" << endl 
+		cout << endl << "STRESSSUITE - a program covering all BDM stress tests." << endl << endl
+		     << argv[0] << " ....................................... run all stress tests" << endl
+		     << argv[0] << " particular_test_1 particular_test_2 ... run selected stress tests" << endl
 		     << argv[0] << " print ................................. print all the implemented stress tests" << endl;
 	}
 
-	itpp::RNG_randomize();
-
-	UnitTest::TestReporterStdout reporter;
-	UnitTest::TestRunner runner ( reporter );
-	return runner.RunTestsIf ( UnitTest::Test::GetTestList(),
-	                           0,
-	                           is_selected_test,
-	                           0 );
+	return run_selected_tests();
 }
Index: library/tests/tutorial/arx_simple.cpp
===================================================================
--- library/tests/tutorial/arx_simple.cpp (revision 682)
+++ library/tests/tutorial/arx_simple.cpp (revision 722)
@@ -9,5 +9,5 @@
 	ARX Ar;
 	Ar.set_statistics ( 1, V0 ); //nu is default (set to have finite moments)
-	Ar.set_constant(true);
+	Ar.set_constant ( true );
 	Ar.validate();
 	// forgetting is default: 1.0
Index: library/tests/tutorial/kalman_simple.cpp
===================================================================
--- library/tests/tutorial/kalman_simple.cpp (revision 679)
+++ library/tests/tutorial/kalman_simple.cpp (revision 722)
@@ -23,5 +23,5 @@
 	// Estimation loop
 	for ( int i = 0; i < 100; i++ ) {
-		KF.bayes ( randn ( dy), randn( du ) );
+		KF.bayes ( randn ( dy ), randn ( du ) );
 	}
 	//print results
Index: library/tests/general_suite.cpp
===================================================================
--- library/tests/general_suite.cpp (revision 722)
+++ library/tests/general_suite.cpp (revision 722)
@@ -0,0 +1,59 @@
+#include "general_suite.h"
+
+namespace UnitTest {
+
+Array<const char *> selected_tests;
+
+bool is_selected_test ( const UnitTest::Test *test ) {
+	bdm_assert_debug ( test, "NULL test" );
+
+	if ( !selected_tests.length() ) {
+		return true;
+	}
+
+	for ( int i = 0; i < selected_tests.length(); ++i ) {
+		const char *n = test->m_details.testName;
+		bdm_assert_debug ( n, "NULL test name" );
+		const char *sname = selected_tests ( i );
+		bdm_assert_debug ( sname, "NULL selected test name" );
+		if ( !strcmp ( n, sname ) ) {
+			return true;
+		}
+	}
+
+	return false;
+}
+
+void print_test_list() {
+	UnitTest::Test* curTest = UnitTest::Test::GetTestList().GetHead();
+
+	while ( curTest != 0 ) {
+		const char *n = curTest->m_details.testName;
+		printf ( "%s\n", n );
+		curTest = curTest->next;
+	}
+}
+
+void pick_selected_tests ( int argc, char const *argv[] ) {
+	selected_tests.set_length ( argc - 1 );
+	const char **param = argv + 1;
+	int i = 0;
+	while ( *param ) {
+		selected_tests ( i ) = *param;
+		++i;
+		++param;
+	}
+}
+
+int run_selected_tests() {
+	itpp::RNG_randomize();
+
+	UnitTest::TestReporterStdout reporter;
+	UnitTest::TestRunner runner ( reporter );
+	return runner.RunTestsIf ( UnitTest::Test::GetTestList(),
+	                           0,
+	                           is_selected_test,
+	                           0 );
+}
+
+}
Index: library/tests/general_suite.h
===================================================================
--- library/tests/general_suite.h (revision 722)
+++ library/tests/general_suite.h (revision 722)
@@ -0,0 +1,39 @@
+/*!
+  \file
+  \brief Support for test suits.
+  \author Miroslav Pistek.
+
+  -----------------------------------
+  BDM++ - C++ library for Bayesian Decision Making under Uncertainty
+
+  Using IT++ for numerical operations
+  -----------------------------------
+*/
+
+#ifndef GENERAL_SUITE_H
+#define GENERAL_SUITE_H
+
+#include "Test.h"
+#include "TestReporterStdout.h"
+#include "UnitTest++.h"
+#include "bdmerror.h"
+#include "itpp_ext.h"
+#include <string.h>
+
+using std::cout;
+using std::cerr;
+using std::endl;
+
+using namespace itpp;
+
+namespace UnitTest {
+
+void print_test_list();
+
+void pick_selected_tests ( int argc, char const *argv[] );
+
+int run_selected_tests();
+
+}
+
+#endif
Index: library/tests/pdf_harness.cpp
===================================================================
--- library/tests/pdf_harness.cpp (revision 713)
+++ library/tests/pdf_harness.cpp (revision 722)
@@ -48,43 +48,43 @@
 
 	int tc = 0;
-	Array<vec> actual(CurrentContext::max_trial_count);
+	Array<vec> actual ( CurrentContext::max_trial_count );
 	do {
 		mat smp = hpdf->samplecond_mat ( cond, nsamples );
 		vec emu = smp * ones ( nsamples ) / nsamples;
-		actual( tc ) = emu;
+		actual ( tc ) = emu;
 		++tc;
 	} while ( ( tc < CurrentContext::max_trial_count ) &&
-		  !UnitTest::AreClose ( mean, actual( tc - 1 ), delta ) );
+	          !UnitTest::AreClose ( mean, actual ( tc - 1 ), delta ) );
 	if ( ( tc == CurrentContext::max_trial_count ) &&
-	     ( !UnitTest::AreClose ( mean, actual( CurrentContext::max_trial_count - 1 ), delta ) ) ) {
+	        ( !UnitTest::AreClose ( mean, actual ( CurrentContext::max_trial_count - 1 ), delta ) ) ) {
 		UnitTest::MemoryOutStream stream;
-		stream << CurrentContext::format_context(__LINE__) << "expected " << mean << " +/- " << delta << " but was " << actual;
+		stream << CurrentContext::format_context ( __LINE__ ) << "expected " << mean << " +/- " << delta << " but was " << actual;
 
-		UnitTest::TestDetails details(*UnitTest::CurrentTest::Details(), 0, false);
+		UnitTest::TestDetails details ( *UnitTest::CurrentTest::Details(), 0, false );
 
 		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
-       }
+	}
 }
 
 void pdf_harness::check_covariance() {
 	int tc = 0;
-	Array<mat> actual(CurrentContext::max_trial_count);
+	Array<mat> actual ( CurrentContext::max_trial_count );
 	do {
 		mat smp = hpdf->samplecond_mat ( cond, nsamples );
 		vec emu = smp * ones ( nsamples ) / nsamples;
 		mat er = ( smp * smp.T() ) / nsamples - outer_product ( emu, emu );
-		actual( tc ) = er;
+		actual ( tc ) = er;
 		++tc;
 	} while ( ( tc < CurrentContext::max_trial_count ) &&
-		  !UnitTest::AreClose ( R, actual( tc - 1 ), tolerance ) );
+	          !UnitTest::AreClose ( R, actual ( tc - 1 ), tolerance ) );
 	if ( ( tc == CurrentContext::max_trial_count ) &&
-	     ( !UnitTest::AreClose ( R, actual( CurrentContext::max_trial_count - 1 ), tolerance ) ) ) {
+	        ( !UnitTest::AreClose ( R, actual ( CurrentContext::max_trial_count - 1 ), tolerance ) ) ) {
 		UnitTest::MemoryOutStream stream;
-		stream << CurrentContext::format_context(__LINE__) << "expected " << R << " +/- " << tolerance << " but was " << actual;
+		stream << CurrentContext::format_context ( __LINE__ ) << "expected " << R << " +/- " << tolerance << " but was " << actual;
 
-		UnitTest::TestDetails details(*UnitTest::CurrentTest::Details(), 0, false);
+		UnitTest::TestDetails details ( *UnitTest::CurrentTest::Details(), 0, false );
 
 		UnitTest::CurrentTest::Results()->OnTestFailure ( details, stream.GetText() );
-       }
+	}
 }
 
Index: library/tests/CMakeLists.txt
===================================================================
--- library/tests/CMakeLists.txt (revision 717)
+++ library/tests/CMakeLists.txt (revision 722)
@@ -7,5 +7,5 @@
 link_directories (./unittest-cpp)
 
-SET(testutil_src epdf_harness.cpp epdf_harness.h mat_checks.cpp mat_checks.h 
+SET(testutil_src general_suite.cpp general_suite.h epdf_harness.cpp epdf_harness.h mat_checks.cpp mat_checks.h 
 	pdf_harness.cpp pdf_harness.h square_mat_point.cpp square_mat_point.h test_util.cpp test_util.h)
 
