Index: /library/bdm/estim/arx.h
===================================================================
--- /library/bdm/estim/arx.h (revision 1036)
+++ /library/bdm/estim/arx.h (revision 1063)
@@ -229,6 +229,5 @@
 
 
-/*!
-* \brief ARX with partial forgetting
+/*! \brief ARX with partial forgetting
 
 Implements partial forgetting when <tt>bayes(const vec &yt, const vec &cond=empty_vec)</tt> is called, where \c cond is a vector <em>(regressor', forg.factor')</em>.
@@ -261,4 +260,5 @@
 
     void bayes ( const vec &val, const vec &cond ); 
+
 	void validate() {
 		ARX::validate();
Index: /library/bdm/estim/particles.h
===================================================================
--- /library/bdm/estim/particles.h (revision 1033)
+++ /library/bdm/estim/particles.h (revision 1063)
@@ -223,8 +223,8 @@
 
 class PF : public BM {
-	//! \var log_level_enums weights
+	//! \var log_level_enums logweights
 	//! all weightes will be logged
 
-	//! \var log_level_enums menas
+	//! \var log_level_enums logmeans
 	//! means of particles will be logged
 	LOG_LEVEL(PF,logweights,logmeans,logvars);
Index: /library/bdm/base/user_info.h
===================================================================
--- /library/bdm/base/user_info.h (revision 1015)
+++ /library/bdm/base/user_info.h (revision 1063)
@@ -395,5 +395,6 @@
 	//! The new instance of type T* is constructed and initialized with values stored in the Setting element[name]
 	//!
-	//! If there does not exist any sub-element named #name and settingPresence is #optional, an empty bdm::shared_ptr<T> is returned. When settingPresence is #compulsory, the returned bdm::shared_ptr<T> is never empty (an exception is thrown when the object isn't found).
+	//! If there does not exist any sub-element named name and settingPresence is optional, an empty bdm::shared_ptr<T> is returned. 
+	//! When settingPresence is compulsory, the returned bdm::shared_ptr<T> is never empty (an exception is thrown when the object isn't found).
 	template<class T>
 	static bdm::shared_ptr<T> build ( const Setting &element, const string &name, SettingPresence settingPresence = optional ) {
@@ -412,5 +413,6 @@
 	//! The new instance of type T* is constructed and initialized with values stored in the Setting element[index]
 	//!
-	//! If there does not exist  any sub-element indexed by #index, and settingPresence is #optional, an empty bdm::shared_ptr<T> is returned. When settingPresence is #compulsory, the returned bdm::shared_ptr<T> is never empty (an exception is thrown when the object isn't found).
+	//! If there does not exist  any sub-element indexed by index, and settingPresence is optional, an empty bdm::shared_ptr<T> is returned. 
+	//! When settingPresence is compulsory, the returned bdm::shared_ptr<T> is never empty (an exception is thrown when the object isn't found).
 	template<class T>
 	static bdm::shared_ptr<T> build ( const Setting &element, const int index, SettingPresence settingPresence = optional ) {
@@ -447,5 +449,5 @@
 
 	//! The existing instance of type T is initialized with values stored in the Setting element[name]
-	//! If there does not exist any sub-element named #name, this method returns false.
+	//! If there does not exist any sub-element named name, this method returns false.
 	template<class T> static bool get ( T &instance, const Setting &element, const string &name, SettingPresence settingPresence = optional ) {
 		if ( !element.exists ( name ) ) {
@@ -461,5 +463,5 @@
 
 	//! The existing instance of type T is initialized with values stored in the Setting element[index]
-	//! If there does not exist any sub-element indexed by #index, this method returns false.
+	//! If there does not exist any sub-element indexed by index, this method returns false.
 	template<class T> static bool get ( T &instance, const Setting &element, const int index, SettingPresence settingPresence = optional ) {
 		if ( element.getLength() <= index ) {
@@ -490,5 +492,5 @@
 
 	//! The existing array of type T is initialized with values stored in the Setting element[name]
-	//! If there is not any sub-element named #name, this method returns false.
+	//! If there is not any sub-element named name, this method returns false.
 	template<class T> static bool get ( Array<T> &array_to_load, const Setting &element, const string &name, SettingPresence settingPresence = optional ) {
 		if ( !element.exists ( name ) ) {
@@ -504,5 +506,5 @@
 
 	//! The existing array of type T is initialized with values stored in the Setting element[index]
-	//! If there is not any sub-element indexed by #index, this method returns false.
+	//! If there is not any sub-element indexed by index, this method returns false.
 	template<class T> static bool get ( Array<T> &array_to_load, const Setting &element, const int index, SettingPresence settingPresence = optional ) {
 		if ( element.getLength() <= index ) {
Index: /library/bdm/base/bdmbase.h
===================================================================
--- /library/bdm/base/bdmbase.h (revision 1060)
+++ /library/bdm/base/bdmbase.h (revision 1063)
@@ -570,5 +570,5 @@
 
   This macro has to be called within a class declaration. Its argument \a classname has to correspond to that wrapping class.
-  This macro defines a log_level instance which can be modified either directly or by the means of #UI class.
+  This macro defines a log_level instance which can be modified either directly or by the means of #bdm::UI class.
 
   One of the main purposes of this macro is to allow variability in using enumerations. By relating them to their names through
@@ -736,6 +736,4 @@
 	//! log upper bound of the density (see function qbounds)
 	
-	//! \var log_level_enums logfull
-	//! log full record of the density in the form of setting
 	LOG_LEVEL(epdf,logmean,loglbound,logubound);
 
@@ -801,5 +799,4 @@
 	//! Set statistics to match given input epdf. Typically it copies statistics from epdf of the same type and projects those form different types
 	//! \param pdf0 epdf to match
-	//! \param option placeholder for potential options
 	void set_statistics(const epdf *pdf0) NOT_IMPLEMENTED_VOID;
 	//!@}
@@ -1309,5 +1306,5 @@
 
 	/*! \brief Incremental Bayes rule
-	@param dt vector of input data
+	@param yt vector of input data
 	*/
 	virtual void bayes ( const vec &yt, const vec &cond = empty_vec ) =0;
Index: /library/bdm/base/datasources.h
===================================================================
--- /library/bdm/base/datasources.h (revision 1060)
+++ /library/bdm/base/datasources.h (revision 1063)
@@ -269,9 +269,9 @@
 	class = 'PdfDS';
 	pdf = configuration of bdm::pdf;          % any offspring of pdf, bdm::pdf::from_setting
-	--- optional ---
+	--- optional fields ---
 	init_rv = RV({'names',...},[sizes,...],[times,...]);   % define what rv to initialize - typically delayed values, time=-1, etc.!
 	init_values = [...];                      % vector of initial values corresponding to init_rv
 	\endcode
-	Class does not inherits from bdm::DS::from_setting, names of data are taken from pdf.rv and pdf.rvc.
+	Class does not call from bdm::DS::from_setting, names of data are taken from pdf.rv and pdf.rvc.
 	
 	If init_rv is not given, init_values are set to zero.
Index: /library/bdm/stat/exp_family.h
===================================================================
--- /library/bdm/stat/exp_family.h (revision 1058)
+++ /library/bdm/stat/exp_family.h (revision 1063)
@@ -30,9 +30,8 @@
 
 /*!
-* \brief General conjugate exponential family posterior density.
+* \brief Abstract class of general conjugate exponential family posterior density.
 
 * More?...
 */
-
 class eEF : public epdf {
 public:
@@ -540,17 +539,22 @@
 		return beta;
 	}
-	/*! configuration structure
+
+	/*! Create object from the following structure
 	\code
 	class = 'eDirich';
-	beta  = [];           //parametr beta
+	beta  = [...];           % vector parameter beta
+	--- inherited fields ---
+	bdm::eEF::from_setting
 	\endcode
 	*/
 	void from_setting ( const Setting &set );
+
 	void validate();
+
 	void to_setting ( Setting &set ) const;
 };
 UIREGISTER ( eDirich );
 
-/*! Product of Beta distributions
+/*! \brief Product of Beta distributions
 
 Continuous Dirichlet density of \f$n\f$-dimensional variable \f$x\f$
@@ -567,72 +571,77 @@
 		vec beta;
 	public:
-		//!\name Constructors
-		//!@{
+	//!\name Constructors
+	//!@{
 			
-			eBeta () : eEF () {};
-			eBeta ( const eBeta &B0 ) : eEF (), alpha(B0.alpha),beta(B0.beta) {
-				validate();
-			};
-			//!@}
+	eBeta () : eEF () {};
+	eBeta ( const eBeta &B0 ) : eEF (), alpha(B0.alpha),beta(B0.beta) {
+		validate();
+	};
+	//!@}
 			
-			//! using sampling procedure from wikipedia
-			vec sample() const {
-				vec y ( beta.length() ); // all vectors
-				for ( int i = 0; i < beta.length(); i++ ) {
-					GamRNG.setup ( alpha ( i ), 1 );
-					#pragma omp critical
-					double Ga = GamRNG();
+	//! using sampling procedure from wikipedia
+	vec sample() const {
+		vec y ( beta.length() ); // all vectors
+		for ( int i = 0; i < beta.length(); i++ ) {
+			GamRNG.setup ( alpha ( i ), 1 );
+			#pragma omp critical
+			double Ga = GamRNG();
 					
-					GamRNG.setup ( beta ( i ), 1 );
-					#pragma omp critical
-					double Gb = GamRNG();
+			GamRNG.setup ( beta ( i ), 1 );
+			#pragma omp critical
+			double Gb = GamRNG();
 					
-					y ( i ) = Ga/(Ga+Gb);
-				}
-				return y;
-			}
+			y ( i ) = Ga/(Ga+Gb);
+		}
+		return y;
+	}
 			
-			vec mean() const {
-				return elem_div(alpha, alpha + beta); // dot-division
-			};
-			vec variance() const {
-				vec apb=alpha+beta;
-				return elem_div (elem_mult ( alpha, beta) ,
-								 elem_mult ( elem_mult(apb,apb), apb+1 ) );
-			}
-			//! In this instance, val is ...
-			double evallog_nn ( const vec &val ) const {
-				double tmp;
-				tmp = ( alpha - 1 ) * log ( val ) + (beta-1)*log(1-val);
-				return tmp;
-			}
+	vec mean() const {
+		return elem_div(alpha, alpha + beta); // dot-division
+	};
+	vec variance() const {
+		vec apb=alpha+beta;
+		return elem_div (elem_mult ( alpha, beta) ,
+							elem_mult ( elem_mult(apb,apb), apb+1 ) );
+	}
+	//! In this instance, val is ...
+	double evallog_nn ( const vec &val ) const {
+		double tmp;
+		tmp = ( alpha - 1 ) * log ( val ) + (beta-1)*log(1-val);
+		return tmp;
+	}
 			
-			double lognc () const {
-				double lgb = 0.0;
-				for ( int i = 0; i < beta.length(); i++ ) {
-					lgb += -lgamma ( alpha(i)+beta(i) ) + lgamma(alpha(i)) + lgamma(beta(i));
-				}
-				return lgb;
-			}
+	double lognc () const {
+		double lgb = 0.0;
+		for ( int i = 0; i < beta.length(); i++ ) {
+			lgb += -lgamma ( alpha(i)+beta(i) ) + lgamma(alpha(i)) + lgamma(beta(i));
+		}
+		return lgb;
+	}
 			
-			/*! configuration structure
-			\code
-			class = 'eBeta';
-			beta  = [];           //parametr beta
-			alpha = [];           //parametr alpha
-			\endcode
-			*/
-			void from_setting ( const Setting &set ){
-				UI::get(alpha, set, "alpha", UI::compulsory);
-				UI::get(beta, set, "beta", UI::compulsory);
-			}
-			void validate(){
-				bdm_assert(alpha.length()==beta.length(), "eBeta:: alpha and beta length do not match");
-				dim = alpha.length();
-			};
-			void to_setting ( Setting &set ) const{
-				UI::save(alpha, set, "alpha");
-				UI::save(beta, set, "beta");
-			}
+	/*! Create object from the following structure
+
+	\code
+	class = 'eBeta';
+	alpha = [...];           % vector parameter alpha
+	beta  = [...];           % vector parameter beta of the same length as alpha
+	\endcode
+			
+	Class does not call bdm::eEF::from_setting
+	*/
+	void from_setting ( const Setting &set ){
+		UI::get(alpha, set, "alpha", UI::compulsory);
+		UI::get(beta, set, "beta", UI::compulsory);
+	}
+
+	void validate(){
+		bdm_assert(alpha.length()==beta.length(), "eBeta:: alpha and beta length do not match");
+		dim = alpha.length();
+	}
+
+	void to_setting ( Setting &set ) const{
+		UI::save(alpha, set, "alpha");
+		UI::save(beta, set, "beta");
+	}
 };
 UIREGISTER ( eBeta );
@@ -682,8 +691,8 @@
 /*! \brief Random Walk with vector Beta distribution
 Using simple assignment
-\f{eqnarray} 
-\alpha &=& rvc / k + \beta_c \\
-\beta &= &(1-rvc) / k + \beta_c \\
-\f{eqnarray}
+\f{eqnarray*} 
+\alpha & = & rvc / k + \beta_c \\
+\beta & = &(1-rvc) / k + \beta_c \\
+\f}
 for each element of alpha and beta, mean value = rvc, variance = (k+1)*mean*mean;
 
@@ -693,5 +702,4 @@
 By default is it set to 0.1;
 */
-
 class mBeta: public pdf_internal<eBeta>{
 	//! vector of constants \f$ k \f$ of the random walk 
@@ -701,30 +709,32 @@
 
 	public:
-		void condition ( const vec &val ) {
-			this->iepdf.alpha =  elem_div(val , k) + betac;
-			this->iepdf.beta =  elem_div (1-val , k) + betac;
-		};
-		/*! Create Beta random walk
-		\f[ f(rv|rvc) = \prod Beta(rvc,k) \f]
-		from structure
-		\code
-		class = 'mBeta';
-		k = 1;                      // multiplicative constant k
-		--- optional ---
-		rv = RV({'name'},size)      // description of RV
-		beta  = [];                 // initial value of beta
-		betac = [];                 // initial value of beta stabilizing constant
-		\endcode
-		*/
-		void from_setting ( const Setting &set );
-		void 	to_setting  (Setting  &set) const;
-		void validate(){
-			
-			pdf_internal<eBeta>::validate();
-			bdm_assert(betac.length()==dimension(),"Incomaptible betac");
-			bdm_assert(k.length()==dimension(),"Incomaptible k");
-			dimc = iepdf.dimension();
-		}
-		//! 
+	void condition ( const vec &val ) {
+		this->iepdf.alpha =  elem_div(val , k) + betac;
+		this->iepdf.beta =  elem_div (1-val , k) + betac;
+	};
+
+	/*! Create Beta random walk
+	\f[ f(rv|rvc) = \prod Beta(rvc,k) \f]
+	from structure
+	\code
+	class = 'mBeta';
+	k = 1;                      // multiplicative constant k
+	--- optional ---
+	rv = RV({'name'},size)      // description of RV
+	beta  = [];                 // initial value of beta
+	betac = [];                 // initial value of beta stabilizing constant
+	\endcode
+	*/
+	void from_setting ( const Setting &set );
+	
+	void to_setting  (Setting  &set) const;
+
+	void validate(){			
+		pdf_internal<eBeta>::validate();
+		bdm_assert(betac.length()==dimension(),"Incomaptible betac");
+		bdm_assert(k.length()==dimension(),"Incomaptible k");
+		dimc = iepdf.dimension();
+	}
+	//! 
 };
 UIREGISTER(mBeta);
@@ -829,15 +839,17 @@
 	}
 
-	/*! Create Gamma density
-	\f[ f(rv|rvc) = \Gamma(\alpha, \beta) \f]
-	from structure
+	/*! Create object from the following structure
+
 	\code
 	class = 'egamma';
-	alpha = [...];         // vector of alpha
-	beta = [...];          // vector of beta
-	rv = RV({'name'})      // description of RV
+	alpha = [...];         % vector of alpha
+	beta = [...];          % vector of beta
+	--- inherited fields ---
+	bdm::eEF::from_setting
 	\endcode
+	 fulfilling formula \f[ f(rv|rvc) = \Gamma(\alpha, \beta) \f]
 	*/
 	void from_setting ( const Setting &set );
+
 	void to_setting ( Setting &set ) const;
 	void validate(); 
@@ -1682,6 +1694,5 @@
 void resample(const vec &w, ivec &ind, RESAMPLING_METHOD=SYSTEMATIC);
 
-/*!
-\brief Weighted empirical density
+/*! \brief Weighted empirical density
 
 Used e.g. in particle filters.
@@ -1771,6 +1782,16 @@
 
 	void to_setting ( Setting &set ) const;
+	
+	/*! Create object from the following structure
+
+	\code
+	class = 'eEmp';
+	samples = [...];               % array of samples 
+	w = [...];					   % weights of samples stored in vector
+	--- inherited fields ---
+	bdm::epdf::from_setting	
+	\endcode	
+	*/
 	void from_setting ( const Setting &set );
-
 };
 UIREGISTER(eEmp);
@@ -1945,5 +1966,5 @@
 }
 
-/*! Dirac delta function distribution */
+/*! \brief Dirac delta function distribution */
 class dirac: public epdf{
 	public: 
@@ -1960,6 +1981,7 @@
 	};
 
-////
-///////
+
+///////////
+
 template<class sq_T>
 void mgnorm<sq_T >::set_parameters ( const shared_ptr<fnc> &g0, const sq_T &R0 ) {
Index: /library/bdm/stat/exp_family.cpp
===================================================================
--- /library/bdm/stat/exp_family.cpp (revision 1033)
+++ /library/bdm/stat/exp_family.cpp (revision 1063)
@@ -438,8 +438,8 @@
 
 void egamma::from_setting ( const Setting &set ) {
-		epdf::from_setting ( set ); // reads rv
-		UI::get ( alpha, set, "alpha", UI::compulsory );
-		UI::get ( beta, set, "beta", UI::compulsory );
-	}
+	epdf::from_setting ( set ); // reads rv
+	UI::get ( alpha, set, "alpha", UI::compulsory );
+	UI::get ( beta, set, "beta", UI::compulsory );
+}
 	
 void egamma::to_setting ( Setting &set ) const
@@ -675,22 +675,23 @@
 
 void eEmp::from_setting ( const Setting &set ) {
-		epdf::from_setting( set );
+	epdf::from_setting( set );
 		
-		UI::get( samples, set, "samples", UI::compulsory );
-		UI::get ( w, set, "w", UI::compulsory );
-	}
-
-void 	eEmp::validate (){
-	  epdf::validate();
-	  bdm_assert (samples.length()==w.length(),"samples and weigths are of different lengths");
-	  n = w.length();
-	  if (n>0)
-		pdf::dim = samples ( 0 ).length();
-	}
-	
-	void eDirich::from_setting ( const Setting &set ) {
-		epdf::from_setting ( set );
-		UI::get ( beta, set, "beta", UI::compulsory );
-	}
+	UI::get( samples, set, "samples", UI::compulsory );
+	UI::get ( w, set, "w", UI::compulsory );
+}
+
+void eEmp::validate (){
+	epdf::validate();
+	bdm_assert (samples.length()==w.length(),"samples and weigths are of different lengths");
+	n = w.length();
+	if (n>0)
+	pdf::dim = samples ( 0 ).length();
+}
+	
+void eDirich::from_setting ( const Setting &set ) {
+	epdf::from_setting ( set );
+	UI::get ( beta, set, "beta", UI::compulsory );
+}
+
 void eDirich::validate() {
 		//check rv
Index: /library/doc/tutorial/kalman.dox
===================================================================
--- /library/doc/tutorial/kalman.dox (revision 661)
+++ /library/doc/tutorial/kalman.dox (revision 1063)
@@ -38,5 +38,5 @@
 \section exa Examples of Use
 
-The classes can be used directly in C++ or via User Info. The latter example is illustrated in file \subpage user_guide2. A very short example of the former follows:
+The classes can be used directly in C++ or via User Info. The latter example is illustrated in file \subpage ui. A very short example of the former follows:
 
 \include kalman_simple.cpp
