diff --git a/mex/build/k_order_perturbation.am b/mex/build/k_order_perturbation.am
index 8560501b425f90893f3100dbba2510025c060e61..57e8a61315b1163ab048440163c1f6f9648967aa 100644
--- a/mex/build/k_order_perturbation.am
+++ b/mex/build/k_order_perturbation.am
@@ -1,4 +1,4 @@
-vpath %.cpp $(top_srcdir)/../../sources/k_order_perturbation
+vpath %.cc $(top_srcdir)/../../sources/k_order_perturbation
 
 noinst_PROGRAMS = k_order_perturbation
 
@@ -11,8 +11,8 @@ CXXFLAGS += $(PTHREAD_CFLAGS)
 k_order_perturbation_LDADD = ../libdynare++/libdynare++.a $(PTHREAD_LIBS) $(LIBADD_DLOPEN)
 
 nodist_k_order_perturbation_SOURCES = \
-	k_order_perturbation.cpp \
-	k_ord_dynare.cpp \
-	k_ord_dynare.h \
-	dynamic_dll.cpp \
-	dynamic_dll.h
+	k_order_perturbation.cc \
+	k_ord_dynare.cc \
+	k_ord_dynare.hh \
+	dynamic_dll.cc \
+	dynamic_dll.hh
diff --git a/mex/sources/build_matlab.m b/mex/sources/build_matlab.m
index 81c53639baec0bc514ee0b60a5a9f96fe8d1380a..5cf635ac455164d518413ad2230212288ae86b91 100644
--- a/mex/sources/build_matlab.m
+++ b/mex/sources/build_matlab.m
@@ -201,9 +201,9 @@ eval([ COMPILE_COMMAND ...
        ' -I../../dynare++/src -I../../dynare++/kord -I../../dynare++/tl/cc -I../../dynare++/utils/cc -I../../dynare++/sylv/cc -I../../dynare++/integ/cc -I. ' ...
        ' -DMEXEXT=' mexext ' ' ...
        '-output k_order_perturbation ' ...
-       'k_order_perturbation/k_order_perturbation.cpp ' ...
-       'k_order_perturbation/k_ord_dynare.cpp ' ...
-       'k_order_perturbation/dynamic_dll.cpp ' ...
+       'k_order_perturbation/k_order_perturbation.cc ' ...
+       'k_order_perturbation/k_ord_dynare.cc ' ...
+       'k_order_perturbation/dynamic_dll.cc ' ...
        LIBDYNAREPP_O ' ' ...
        DL_PATH ' ' BLAS_PATH ' ' LAPACK_PATH]);
 
diff --git a/mex/sources/k_order_perturbation/Readme.txt b/mex/sources/k_order_perturbation/Readme.txt
deleted file mode 100644
index 61031640f8c25005e295a47bd30b8ffea52337ee..0000000000000000000000000000000000000000
--- a/mex/sources/k_order_perturbation/Readme.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-k_order_perturbation project status
-
-NOTE: The dll  (mexw32 or so) is called from new Matlab Dynare function dr1_k_order
-derived from dr1, after set_state_space as:
-
-[ysteady, ghx_u]=k_ord_dynare_perturbation(dr,task,M_,options_, oo_, ['.' mexext])
-
-where last term is optional but it will default to .dll on windows and .so on linux.
-
-dr1_k_order is called by amended resol.m:
-
-elseif(options_.use_k_order==1)&& (check_flag == 0)
-    [dr,info,M_,options_,oo_] = dr1_k_order(dr,check_flag,M_,options_,oo_);
-else
-
-and requirese options to be set
-
-options_.use_k_order=1;
-
-==================
-Tests:
-
-first_order.m is matlab emulation of Dynare++ c++ first_order.cpp for testing pruposes
-
-
-==================
-ToDO:
-==================
-1) amend <model>.m to use Dynamic_mexopts.bat
-
-   mex -f Dynamic_mexopts.bat -O fs2000k_no_both_UR_dynamic.c
-
-or amend preprocessor to make mex to export Dynamic() function as well as mexFunction() as the Dynamic_mexopts.bat does, e.g.:
-
-set LINKFLAGS=/dll /export:Dynamic /export:%ENTRYPOINT% /MAP ....
-
-2) make k_order_perturbation handle models  which have the "both" variables (i.e. variables that appear both as lag and as lead)
diff --git a/mex/sources/k_order_perturbation/dynamic_dll.cpp b/mex/sources/k_order_perturbation/dynamic_dll.cc
similarity index 98%
rename from mex/sources/k_order_perturbation/dynamic_dll.cpp
rename to mex/sources/k_order_perturbation/dynamic_dll.cc
index 414b9d50a438df20490d19b23fd3f5f01c56ebe6..e35d13883a666e67124735c8ca44146ec12f8768 100644
--- a/mex/sources/k_order_perturbation/dynamic_dll.cpp
+++ b/mex/sources/k_order_perturbation/dynamic_dll.cc
@@ -17,8 +17,8 @@
  * along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "k_ord_dynare.h"
-#include "dynamic_dll.h"
+#include "k_ord_dynare.hh"
+#include "dynamic_dll.hh"
 
 #include <sstream>
 
diff --git a/mex/sources/k_order_perturbation/dynamic_dll.h b/mex/sources/k_order_perturbation/dynamic_dll.hh
similarity index 100%
rename from mex/sources/k_order_perturbation/dynamic_dll.h
rename to mex/sources/k_order_perturbation/dynamic_dll.hh
diff --git a/mex/sources/k_order_perturbation/k_ord_dynare.cpp b/mex/sources/k_order_perturbation/k_ord_dynare.cc
similarity index 99%
rename from mex/sources/k_order_perturbation/k_ord_dynare.cpp
rename to mex/sources/k_order_perturbation/k_ord_dynare.cc
index 20585ae0e753132a98201cbb67998df25156825f..ab82077413d7a7188af635f1d8354725db18c3e4 100644
--- a/mex/sources/k_order_perturbation/k_ord_dynare.cpp
+++ b/mex/sources/k_order_perturbation/k_ord_dynare.cc
@@ -21,8 +21,8 @@
 
 #include <vector>
 #include "first_order.h"
-#include "k_ord_dynare.h"
-#include "dynamic_dll.h"
+#include "k_ord_dynare.hh"
+#include "dynamic_dll.hh"
 
 #include <cmath>
 #include <sstream>
diff --git a/mex/sources/k_order_perturbation/k_ord_dynare.h b/mex/sources/k_order_perturbation/k_ord_dynare.hh
similarity index 100%
rename from mex/sources/k_order_perturbation/k_ord_dynare.h
rename to mex/sources/k_order_perturbation/k_ord_dynare.hh
diff --git a/mex/sources/k_order_perturbation/k_order_perturbation.cpp b/mex/sources/k_order_perturbation/k_order_perturbation.cc
similarity index 99%
rename from mex/sources/k_order_perturbation/k_order_perturbation.cpp
rename to mex/sources/k_order_perturbation/k_order_perturbation.cc
index 226a919955b9c22aadbdf52a98fc7960fbd0f57e..6bac93865b3f1b2ca42416a58bb21c83bb66b695 100644
--- a/mex/sources/k_order_perturbation/k_order_perturbation.cpp
+++ b/mex/sources/k_order_perturbation/k_order_perturbation.cc
@@ -38,8 +38,8 @@
  //			g_2 - 2nd order rules packed in one matrix
  **********************************************************/
 
-#include "k_ord_dynare.h"
-#include "dynamic_dll.h"
+#include "k_ord_dynare.hh"
+#include "dynamic_dll.hh"
 
 #include <cmath>
 #include <cstring>
diff --git a/mex/sources/k_order_perturbation/tests/k_order_test_main.cpp b/mex/sources/k_order_perturbation/tests/k_order_test_main.cc
similarity index 100%
rename from mex/sources/k_order_perturbation/tests/k_order_test_main.cpp
rename to mex/sources/k_order_perturbation/tests/k_order_test_main.cc