diff --git a/matlab/CutSample.m b/matlab/CutSample.m
index 845bed8b814744445f07c34e3df6c36fe7bb3333..bb2e8feca9c40e09e1293bd98f228d2efee02d6b 100644
--- a/matlab/CutSample.m
+++ b/matlab/CutSample.m
@@ -48,7 +48,7 @@ else
 end
 TotalNumberOfMhFiles = sum(record.MhDraws(:,2));
 TotalNumberOfMhDraws = sum(record.MhDraws(:,1));
-MAX_nruns = ceil(options_.MaxNumberOfBytes/(npar+2)/8)
+MAX_nruns = ceil(options_.MaxNumberOfBytes/(npar+2)/8);
 FirstDraw = max(1,floor(options_.mh_drop*TotalNumberOfMhDraws));
 FirstMhFile = ceil(FirstDraw/MAX_nruns);
 FirstLine = FirstDraw-(FirstMhFile-1)*MAX_nruns+1;
diff --git a/matlab/GetPosteriorParametersStatistics.m b/matlab/GetPosteriorParametersStatistics.m
index a0bec03f9739b67478d55efe22b23c5f1907adef..a23363712a41a86b52d3005ea187210749591f98 100644
--- a/matlab/GetPosteriorParametersStatistics.m
+++ b/matlab/GetPosteriorParametersStatistics.m
@@ -51,7 +51,7 @@ OutputDirectoryName = CheckPath('Output');
 load([ DirectoryName '/'  M_.fname '_mh_history'])
 FirstMhFile = record.KeepedDraws.FirstMhFile;
 FirstLine = record.KeepedDraws.FirstLine;
-TotalNumberOfMhFiles = sum(record.MhDraws(:,2))
+TotalNumberOfMhFiles = sum(record.MhDraws(:,2));
 TotalNumberOfMhDraws = sum(record.MhDraws(:,1));
 FirstMhFile = record.KeepedDraws.FirstMhFile;
 NumberOfDraws = TotalNumberOfMhDraws-floor(options_.mh_drop*TotalNumberOfMhDraws);
diff --git a/matlab/check_list_of_variables.m b/matlab/check_list_of_variables.m
index 7ed79ccd96e1ad839812fe09a817e39fcd66de4d..6705ced009a40799bd2185b2d443c40fbe6bb59a 100644
--- a/matlab/check_list_of_variables.m
+++ b/matlab/check_list_of_variables.m
@@ -33,7 +33,7 @@ function varlist = check_list_of_variables(options_, M_, varlist)
 
     if isempty(varlist)
         disp(' ')
-        disp(['You did not declared endogenous variables after the estimation command.'])
+        disp(['You did not declare endogenous variables after the estimation command.'])
         cas = [];
         if options_.bayesian_irf
             cas = 'Posterior IRFs';
diff --git a/matlab/csminwel.m b/matlab/csminwel.m
index 809d7314e4699add7fb4443456810503c8cf3f87..e3439d8402e0ba476692869f367fd623ae67ce1c 100644
--- a/matlab/csminwel.m
+++ b/matlab/csminwel.m
@@ -198,7 +198,6 @@ while ~done
                      end
                      wall3=badg3;
                      % g3
-                     badg3
                      save g3.mat g3 x3 f3 varargin;
                      %ARGLIST
                      %save g3 g3 x3 f3 P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12 P13;
@@ -219,17 +218,17 @@ while ~done
    end
    %how to pick gh and xh
    if f3 < f - crit & badg3==0
-      ih=3
+      ih=3;
       fh=f3;xh=x3;gh=g3;badgh=badg3;retcodeh=retcode3;
    elseif f2 < f - crit & badg2==0
-      ih=2
+      ih=2;
       fh=f2;xh=x2;gh=g2;badgh=badg2;retcodeh=retcode2;
    elseif f1 < f - crit & badg1==0
-      ih=1
+      ih=1;
       fh=f1;xh=x1;gh=g1;badgh=badg1;retcodeh=retcode1;
    else
       [fh,ih] = min([f1,f2,f3]);
-      disp(sprintf('ih = %d',ih))
+      %disp(sprintf('ih = %d',ih))
       %eval(['xh=x' num2str(ih) ';'])
       switch ih
          case 1
diff --git a/matlab/dynare_estimation.m b/matlab/dynare_estimation.m
index 1ed04fa0de4c718ca4244c38e301776576334e67..f2e076a718f263597d3b75460384f49b046cd672 100644
--- a/matlab/dynare_estimation.m
+++ b/matlab/dynare_estimation.m
@@ -276,7 +276,7 @@ else% if the steady state file is not provided.
    oo_.steady_state = dd.ys; clear('dd');
 end
 if all(abs(oo_.steady_state(bayestopt_.mfys))<1e-9)
-    disp('no constant')
+    disp('No constant.')
     options_.noconstant = 1;
 else
     options_.noconstant = 0;
@@ -934,7 +934,6 @@ if (any(bayestopt_.pshape  >0 ) & options_.mh_replic) | ...
   %% Results are saved (in case of an anormal exit from dynare or matlab)...
   %%save([M_.fname '_results.mat'],'oo_','M_');
   %%
-  oo_
   oo_ = PlotPosteriorDistributions(estim_params_, M_, options_, bayestopt_, oo_);
   metropolis_draw(1);
   if options_.bayesian_irf
diff --git a/matlab/metropolis_hastings_initialization.m b/matlab/metropolis_hastings_initialization.m
index 1af16a4b58c34fe4d630ebc2d4c337b367aae95c..c7779afaee47012f13ddbe23ade4356756a02ddc 100644
--- a/matlab/metropolis_hastings_initialization.m
+++ b/matlab/metropolis_hastings_initialization.m
@@ -63,12 +63,12 @@ if ~options_.load_mh_file & ~options_.mh_recover
     files = dir([ MhDirectoryName '/' ModelName '_mh*_blck*.mat']);
     if length(files)
         delete([ MhDirectoryName '/' ModelName '_mh*_blck*.mat']);
-        disp('MH: Old _mh files succesfully erased!')
+        disp('MH: Old _mh files successfully erased!')
     end
     file = dir([ MhDirectoryName '/metropolis.log']);
     if length(file)
         delete([ MhDirectoryName '/metropolis.log']);
-        disp('MH: Old metropolis.log file succesfully erased!')
+        disp('MH: Old metropolis.log file successfully erased!')
         disp('MH: Creation of a new metropolis.log file.')
     end
     fidlog = fopen([MhDirectoryName '/metropolis.log'],'w');
@@ -150,7 +150,7 @@ if ~options_.load_mh_file & ~options_.mh_recover
     file = dir([MhDirectoryName '/'  ModelName '_mh_history.mat']);
     if length(files)
         delete([ MhDirectoryName '/' ModelName '_mh_history.mat']);
-        disp('MH: Old mh_history file succesfully erased!')
+        disp('MH: Old mh_history file successfully erased!')
     end
     AnticipatedNumberOfFiles = ceil(nruns(1)/MAX_nruns);
     AnticipatedNumberOfLinesInTheLastFile = nruns(1) - (AnticipatedNumberOfFiles-1)*MAX_nruns;