diff --git a/bin/analyzegrid/consistent_gmsh.cc b/bin/analyzegrid/consistent_gmsh.cc
index 00e7d889fd23bb22e741f139cd2470ba55698023..cda4729adfbaf307e4aa846984424b244778786a 100644
--- a/bin/analyzegrid/consistent_gmsh.cc
+++ b/bin/analyzegrid/consistent_gmsh.cc
@@ -1,10 +1,10 @@
 #include "config.h"
 
+#include <iostream>
+#include <iomanip>
 #include <dune/common/parallel/mpihelper.hh>
-#include <dune/common/parametertree.hh>
-#include "dune/common/parametertreeparser.hh"
 #include <dune/grid/uggrid.hh>
-#include <dune/testtools/gridconstruction.hh>
+#include <dune/grid/io/file/gmshreader.hh>
 
 #include <dune/consistent-edge-orientation/createconsistentgrid.hh>
 
@@ -12,15 +12,14 @@ int main(int argc, char** argv){
    try
    {
     if (argc != 3){
-      std::cout << "Need ini file and output filename." << std::endl;
+      std::cout << "Need input gmsh file and output filename." << std::endl;
       return 1;
     }
 
     // Initialize basic stuff...
     Dune::MPIHelper& mpihelper = Dune::MPIHelper::instance(argc, argv);
     using RangeType = double;
-    Dune::ParameterTree initree;
-    Dune::ParameterTreeParser::readINITree(argv[1], initree);
+    std::string infile = std::string(argv[1]);
 
     // From the ini file we can't extract if the grid is a 2D or a 3D grid. We
     // just try the 3D case. If the msh file is a 2D grid Dune will throw an
@@ -30,8 +29,7 @@ int main(int argc, char** argv){
       const int dim = 3;
       using Grid = Dune::UGGrid<dim>;
       using GV = Grid::LeafGridView;
-      IniGridFactory<Grid> factory(initree);
-      std::shared_ptr<Grid> grid = factory.getGrid();
+      auto grid = Dune::GmshReader<Grid>::read(infile);
       GV gv = grid->leafGridView();
 
       std::string filename = std::string(argv[2]);
@@ -42,8 +40,7 @@ int main(int argc, char** argv){
       const int dim = 2;
       using Grid = Dune::UGGrid<dim>;
       using GV = Grid::LeafGridView;
-      IniGridFactory<Grid> factory(initree);
-      std::shared_ptr<Grid> grid = factory.getGrid();
+      auto grid = Dune::GmshReader<Grid>::read(infile);
       GV gv = grid->leafGridView();
 
       std::string filename = std::string(argv[2]);