Index: library/bdm/estim/arx.h
===================================================================
--- library/bdm/estim/arx.h (revision 1064)
+++ library/bdm/estim/arx.h (revision 1077)
@@ -27,7 +27,7 @@
 Regression of the following kind:
 \f[
-y_t = \theta_1 \psi_1 + \theta_2 + \psi_2 +\ldots + \theta_n \psi_n + r e_t
+y_t =     heta_1 \psi_1 +     heta_2 + \psi_2 +\ldots +     heta_n \psi_n + r e_t
 \f]
-where unknown parameters \c rv are \f$[\theta r]\f$, regression vector \f$\psi=\psi(y_{1:t},u_{1:t})\f$ is a known function of past outputs and exogeneous variables \f$u_t\f$. Distrubances \f$e_t\f$ are supposed to be normally distributed:
+where unknown parameters \c rv are \f$[    heta r]\f$, regression vector \f$\psi=\psi(y_{1:t},u_{1:t})\f$ is a known function of past outputs and exogeneous variables \f$u_t\f$. Distrubances \f$e_t\f$ are supposed to be normally distributed:
 \f[
 e_t \sim \mathcal{N}(0,1).
@@ -39,5 +39,5 @@
 \include arx_simple.cpp
 
-	\todo sort out constant terms - bayes should accept vec without additional 1s
+	    odo sort out constant terms - bayes should accept vec without additional 1s
 */
 class ARX: public BMEF {
@@ -132,20 +132,21 @@
     //!@}
 
-    /*! UI for ARX estimator
+    /*! Create object from the following structure
 
     \code
     class = 'ARX';
-    yrv   = RV({names_of_dt} )                 // description of output variables
-    rgr   = RV({names_of_regressors}, [-1,-2]} // description of regressor variables
-    constant = 1;                              // 0/1 switch if the constant term is modelled or not
-
-    --- optional ---
-    prior = {class='egiw',...};                // Prior density, when given default is used instead
-    alternative = {class='egiw',...};          // Alternative density in stabilized estimation, when not given prior is used
-
-    frg = 1.0;                                 // forgetting, default frg=1.0
-
-    rv  = RV({names_of_parameters}}            // description of parametetr names
-    										   // default: [""]
+    rgr = RV({'names',...},[sizes,...],[times,...]);   % description of regressor variables
+    --- optional fields ---    
+    prior = configuration of bdm::egiw;                % any offspring of eqiw for prior density, bdm::egiw::from_setting
+    alternative = configuration of bdm::egiw;          % any offspring of eqiw for alternative density in stabilized estimation of prior density    
+    constant = [];                                     % 0/1 switch if the constant term is modelled or not
+    --- inherited fields ---
+    bdm::BMEF::from_setting
+    \endcode
+    If the optional fields are not given, they will be filled as follows:
+    \code
+    prior = posterior;                                % when prior is not given the posterior is used (TODO it is unclear)
+    alternative = prior;                              % when alternative is not given the prior is used
+    constant = 1;                                     % constant term is modelled on default
     \endcode
     */
@@ -208,6 +209,6 @@
 SHAREDPTR ( ARX );
 
-/*! ARX model conditined by knowledge of the forgetting factor
-\f[ f(\theta| d_1 \ldots d_t , \phi_t) \f]
+/*! \brief ARX model conditined by knowledge of the forgetting factor
+\f[ f(    heta| d_1 \ldots d_t , \phi_t) \f]
 
 The symbol \f$ \phi \f$ is assumed to be the last of the conditioning variables.
Index: library/bdm/estim/mixtures.cpp
===================================================================
--- library/bdm/estim/mixtures.cpp (revision 1064)
+++ library/bdm/estim/mixtures.cpp (revision 1077)
@@ -39,6 +39,6 @@
         //Coms ( i )->flatten ( SharpCom.get(), 1.0/Coms.length() );
     }
-    MixEF_options old_opt =options;
-    MixEF_options ini_opt=options;
+    Options old_opt =options;
+    Options ini_opt=options;
     ini_opt.method = EM;
     ini_opt.max_niter= 1;
Index: library/bdm/estim/mixtures.h
===================================================================
--- library/bdm/estim/mixtures.h (revision 1066)
+++ library/bdm/estim/mixtures.h (revision 1077)
@@ -31,7 +31,7 @@
 mixture models of the following kind:
 \f[
-f(y_t|\psi_t, \Theta) = \sum_{i=1}^{n} w_i f(y_t|\psi_t, \theta_i)
+f(y_t|\psi_t,     heta) = \sum_{i=1}^{n} w_i f(y_t|\psi_t,     heta_i)
 \f]
-where  \f$\psi\f$ is a known function of past outputs, \f$w=[w_1,\ldots,w_n]\f$ are component weights, and component parameters \f$\theta_i\f$ are assumed to be mutually independent. \f$\Theta\f$ is an aggregation af all component parameters and weights, i.e. \f$\Theta = [\theta_1,\ldots,\theta_n,w]\f$.
+where  \f$\psi\f$ is a known function of past outputs, \f$w=[w_1,\ldots,w_n]\f$ are component weights, and component parameters \f$    heta_i\f$ are assumed to be mutually independent. \f$    heta\f$ is an aggregation af all component parameters and weights, i.e. \f$    heta = [    heta_1,\ldots,    heta_n,w]\f$.
 
 The characteristic feature of this model is that if the exact values of the latent variable were known, estimation of the parameters can be handled by a single model. For example, for the case of mixture models, posterior density for each component parameters would be a BayesianModel from Exponential Family.
@@ -50,5 +50,5 @@
 class MixEF: public BMEF {
 protected:
-    //! Models for Components of \f$\theta_i\f$
+    //! Models for Components of \f$    heta_i\f$
     Array<BMEF*> Coms;
     //! Statistics for weights
@@ -72,5 +72,5 @@
     ////!indices of component rvc in common rvc
 
-    class MixEF_options: public root {
+    class Options: public root {
     public:
         //! Flag for a method that is used in the inference
@@ -80,11 +80,19 @@
         int max_niter;
 
-        MixEF_options():method(QB),max_niter(10) {};
-
-        //! Settings for MixEF
-        /*!
+        Options():method(QB),max_niter(10) {};
+
+         /*! Create object from the following structure
+
         \code
-        method = "EM";               % or QB (default)
-        max_iter = 10;               % maximum number of iterations
+        --- optional fields ---        
+        method = '...';            % 'EM' or 'QB', methods of computing bayes
+        max_iter = [];             % maximum number of iterations in bayes_batch
+        --- inherited fields ---
+        bdm::root::from_setting
+        \endcode
+        If the optional fields are not given, they will be filled as follows:
+        \code
+        max_niter = 10;            
+        method = 'QB';
         \endcode
         */
@@ -98,4 +106,5 @@
             UI::get(max_niter,set,"max_niter",UI::optional);
         };
+
         void to_setting(Setting &set)const {
             string meth=(method==EM ? "EM" : "QB");
@@ -105,5 +114,5 @@
     };
 
-    MixEF_options options;
+    Options options;
 public:
     //! Full constructor
@@ -170,10 +179,15 @@
         UI::save (options, set, "options");
     }
-    /*! \brief reads data from setting
+
+    /*! Create object from the following structure
+
     \code
-    Coms = {struct('class',"BMEF..."),...};           % Components - Bayesian models (BM)
-    weights = [0.2, 0.3,...];                         % weights
-    options.method = "EM" or "QB";                    % methods of computing bayes
-    options.max_iter = 10;                            % maximum number of iterations in bayes_batch
+    class = 'MixEF';
+    Coms = { list of bdm::BMEF };                    % list of components containing any offsprings of Bayesian models BMEF, bdm::BMEF::from_setting
+    weights = [...];                                 % vector containing weights of components
+    --- optional fields ---
+    options = configuration of bdm::MixEF::Options;  % see MixEF::Options, bdm::MixEF::Options::from_setting
+    --- inherited fields ---
+    bdm::BMEF::from_setting
     \endcode
     */
@@ -187,4 +201,5 @@
 UIREGISTER ( MixEF );
 
+//! \brief TODO DOCUMENTATION IS MISSING HERE
 class ARXprod: public ProdBMBase {
     Array<shared_ptr<ARX> > arxs;
Index: library/bdm/estim/kalman.h
===================================================================
--- library/bdm/estim/kalman.h (revision 1064)
+++ library/bdm/estim/kalman.h (revision 1077)
@@ -137,19 +137,15 @@
         return est;
     }
-    //! load basic elements of Kalman from structure
-    /*! \code
-        class = 'KalmanFull';
-    	A     = [];                   // Matrix A
-    	B     = [];                   // Matrix B
-    	C     = [];                   // Matrix C
-    	D     = [];                   // Matrix D
-    	Q     = [];                   // Matrix Q
-    	R     = [];                   // Matrix R
-    	prior = struct('class','epdf_offspring');    // Prior density - will be converted to gaussian
-    	yrv   = RV('some_names');     // Description of required observations
-    	rvc   = RV('some_names');     // Description of required inputs
-    	\endcode
-
-    	*/
+    
+    /*! Create object from the following structure
+
+    \code
+    class = 'KalmanFull';
+    prior = configuration of bdm::epdf;          % prior density represented by any offspring of epdf, bdm::epdf::from_setting - it will be converted to gaussian
+    --- inherited fields ---
+    bdm::StateSpace<sq_T>::from_setting
+    bdm::BM::from_setting
+    \endcode
+    */
     void from_setting ( const Setting &set ) {
         StateSpace<sq_T>::from_setting ( set );
@@ -242,8 +238,16 @@
     void bayes ( const vec &yt, const vec &cond = empty_vec );
 
+    /*! Create object from the following structure
+
+    \code
+    class = 'KalmanCh';
+    --- inherited fields ---
+    bdm::Kalman<chmat>::from_setting
+    \endcode
+    */
     void from_setting ( const Setting &set ) {
         Kalman<chmat>::from_setting ( set );
-        validate();
-    }
+    }
+
     void validate() {
         Kalman<chmat>::validate();
@@ -283,4 +287,28 @@
         return est._R().to_mat();
     }
+
+   /*! Create object from the following structure
+
+    \code
+    class = 'EKFfull';
+  
+    OM = configuration of bdm::diffbifn;    % any offspring of diffbifn, bdm::diffbifn::from_setting
+    IM = configuration of bdm::diffbifn;    % any offspring of diffbifn, bdm::diffbifn::from_setting
+    dQ = [...];                             % vector containing diagonal of Q
+    dR = [...];                             % vector containing diagonal of R
+    --- optional fields ---
+    mu0 = [...];                            % vector of statistics mu0
+    dP0 = [...];                            % vector containing diagonal of P0
+    -- or --
+    P0 = [...];                             % full matrix P0
+    --- inherited fields ---
+    bdm::BM::from_setting
+    \endcode
+    If the optional fields are not given, they will be filled as follows:
+    \code
+    mu0 = [0,0,0,....];                     % empty statistics
+    P0 = eye( dim );              
+    \endcode
+    */
     void from_setting ( const Setting &set ) {
         BM::from_setting ( set );
@@ -365,5 +393,27 @@
     //! Here dt = [yt;ut] of appropriate dimensions
     void bayes ( const vec &yt, const vec &cond = empty_vec );
-
+    
+    /*! Create object from the following structure
+
+    \code
+    class = 'EKFCh';
+    OM = configuration of bdm::diffbifn;    % any offspring of diffbifn, bdm::diffbifn::from_setting
+    IM = configuration of bdm::diffbifn;    % any offspring of diffbifn, bdm::diffbifn::from_setting
+    dQ = [...];                             % vector containing diagonal of Q
+    dR = [...];                             % vector containing diagonal of R
+    --- optional fields ---
+    mu0 = [...];                            % vector of statistics mu0
+    dP0 = [...];                            % vector containing diagonal of P0
+    -- or --
+    P0 = [...];                             % full matrix P0
+    --- inherited fields ---
+    bdm::BM::from_setting
+    \endcode
+    If the optional fields are not given, they will be filled as follows:
+    \code
+    mu0 = [0,0,0,....];                     % empty statistics
+    P0 = eye( dim );              
+    \endcode
+    */
     void from_setting ( const Setting &set );
 
@@ -481,5 +531,5 @@
 State-Space representation of multivariate autoregressive model.
 The original model:
-\f[ y_t = \theta [\ldots y_{t-k}, \ldots u_{t-l}, \ldots z_{t-m}]' + \Sigma^{-1/2} e_t \f]
+\f[ y_t =     heta [\ldots y_{t-k}, \ldots u_{t-l}, \ldots z_{t-m}]' + \Sigma^{-1/2} e_t \f]
 where \f$ k,l,m \f$ are maximum delayes of corresponding variables in the regressor.
 
Index: library/bdm/estim/particles.h
===================================================================
--- library/bdm/estim/particles.h (revision 1068)
+++ library/bdm/estim/particles.h (revision 1077)
@@ -67,4 +67,15 @@
         }
     }
+
+
+    /*! Create object from the following structure
+
+    \code
+    class = "MarginalizedParticleBase";
+    bm = configuration of bdm::BM;          % any offspring of BM, bdm::BM::from_setting
+    --- inherited fields ---
+    bdm::BM::from_setting
+    \endcode
+    */
     void from_setting(const Setting &set) {
         BM::from_setting ( set );
@@ -78,4 +89,5 @@
 };
 
+//! \brief Internal class used in PF (surely?)
 class MarginalizedParticle : public MarginalizedParticleBase {
 protected:
@@ -110,12 +122,13 @@
     }
 
-    /*! parse structure
+    /*! Create object from the following structure
+
     \code
     class = "MarginalizedParticle";
-    parameter_pdf = {class = 'epdf_offspring', ...};
-    bm = {class = 'bm_offspring',...};
+    parameter_pdf = configuration of bdm::epdf;          % any offspring of epdf, bdm::epdf::from_setting
+    --- inherited fields ---
+    bdm::MarginalizedParticleBase::from_setting
     \endcode
-    If rvs are set, then it checks for compatibility.
-    */
+    */    
     void from_setting(const Setting &set) {
         MarginalizedParticleBase::from_setting ( set );
@@ -159,5 +172,5 @@
 UIREGISTER(MarginalizedParticle);
 
-//! class used in PF
+//! Internal class which is used in PF
 class BootstrapParticle : public BM {
     dirac est;
@@ -193,11 +206,12 @@
     }
 
-    /*! parse structure
+    /*! Create object from the following structure
     \code
     class = "BootstrapParticle";
-    parameter_pdf = {class = 'epdf_offspring', ...};
-    observation_pdf = {class = 'epdf_offspring',...};
+    parameter_pdf = configuration of bdm::epdf;      % any offspring of epdf, bdm::epdf::from_setting
+    observation_pdf = configuration of bdm::epdf;    % any offspring of epdf, bdm::epdf::from_setting
+    --- inherited fields ---
+    bdm::BM::from_setting
     \endcode
-    If rvs are set, then it checks for compatibility.
     */
     void from_setting(const Setting &set) {
@@ -206,4 +220,5 @@
         obs = UI::build<pdf> ( set, "observation_pdf", UI::compulsory );
     }
+
     void validate() {
         yrv = obs->_rv();
