diff --git a/Makefile.am b/Makefile.am
index ff8fa738bdef93508f6e5e9ebe420f3507f95ac3..be4207e93aa466801c22b849151c9cb81d97b82b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -31,5 +31,6 @@ clean-local:
 dist-hook: clean-local
 	rm -rf `find $(distdir) -name .svn`
 	rm -rf `find $(distdir)/mex/sources -name *.o`
-	rm -f $(distdir)/matlab/dynare_m$(EXEEXT)
+	rm -rf `find $(distdir)/matlab -name *~`
+	rm -f $(distdir)/matlab/dynare_m$(EXEEXT) $(distdir)/matlab/dynare_version.m
 	$(MKDIR_P) $(distdir)/mex/matlab $(distdir)/mex/octave
diff --git a/license.txt b/license.txt
index 516ac76d314a9a021ffaeba70d1f93b4b7864b8c..10f10415cb680ceb8b7aba11753a7bb58e081a53 100644
--- a/license.txt
+++ b/license.txt
@@ -248,10 +248,8 @@ License: GPL-2+ with special Autoconf exception
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
  .
- You should have received a copy of the GNU General Public License
- along with this program; see the file COPYING.  If not, write to
- the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- Boston, MA 02111-1307, USA.
+ You should have received a copy of the GNU General Public License along
+ with this program. If not, see <http://www.gnu.org/licenses/>.
  .
  As a special exception to the GNU General Public License, if
  you distribute this file as part of a program that contains a
diff --git a/m4/ax_matlab.m4 b/m4/ax_matlab.m4
index 22249b1d81ab016ba0ae460588719fa1a6cc1b2f..f6b06763fac20625c50ad408447fa20bebbbfc41 100644
--- a/m4/ax_matlab.m4
+++ b/m4/ax_matlab.m4
@@ -13,10 +13,8 @@ dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl GNU General Public License for more details.
 dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; see the file COPYING.  If not, write to
-dnl the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
-dnl Boston, MA 02111-1307, USA.
+dnl You should have received a copy of the GNU General Public License along
+dnl with this program. If not, see <http://www.gnu.org/licenses/>.
 dnl
 dnl As a special exception to the GNU General Public License, if
 dnl you distribute this file as part of a program that contains a
diff --git a/m4/ax_matlab_arch.m4 b/m4/ax_matlab_arch.m4
index 1b0622464003611dd063663afc8fdd132166087b..fca6b96edb0fded4739e537625e9df6822d3412e 100644
--- a/m4/ax_matlab_arch.m4
+++ b/m4/ax_matlab_arch.m4
@@ -13,10 +13,8 @@ dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl GNU General Public License for more details.
 dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; see the file COPYING.  If not, write to
-dnl the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
-dnl Boston, MA 02111-1307, USA.
+dnl You should have received a copy of the GNU General Public License along
+dnl with this program. If not, see <http://www.gnu.org/licenses/>.
 dnl
 dnl As a special exception to the GNU General Public License, if
 dnl you distribute this file as part of a program that contains a
diff --git a/m4/ax_mexext.m4 b/m4/ax_mexext.m4
index 208a0b18458f238e42de60143e9d0f39f63ef12b..17a5c58ed700c0f481d4e45a3836794e3096c9bd 100644
--- a/m4/ax_mexext.m4
+++ b/m4/ax_mexext.m4
@@ -13,10 +13,8 @@ dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 dnl GNU General Public License for more details.
 dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; see the file COPYING.  If not, write to
-dnl the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
-dnl Boston, MA 02111-1307, USA.
+dnl You should have received a copy of the GNU General Public License along
+dnl with this program. If not, see <http://www.gnu.org/licenses/>.
 dnl
 dnl As a special exception to the GNU General Public License, if
 dnl you distribute this file as part of a program that contains a
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 55bcd42f4d2514fcc21d06d578343e3cc7545ae9..ecf041ea48c51194949c9743c3db4b260b0859fe 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -96,6 +96,7 @@ clean-local:
 		$(patsubst %.mod, %_mean.mat, $(MODS)) \
 		$(patsubst %.mod, %_pindx.mat, $(MODS)) \
 		$(patsubst %.mod, %_params.mat, $(MODS)) \
+		$(patsubst %.mod, %_simul, $(MODS)) \
 		$(patsubst %.mod, %.log, $(MODS))
 
 	rm -rf $(patsubst %.mod, %, $(MODS))
@@ -110,9 +111,8 @@ clean-local:
 		$(shell find -name H.dat)
 
 	rm -f arima/data1.m arima/data2.m \
-		k_order_perturbation/*_simul \
 		k_order_perturbation/*.jnl \
-    k_order_perturbation/*.mat \
+		k_order_perturbation/*.mat \
 		block_bytecode/fs2000_simk.swp
 
 	rm -rf ramsey_objective