Index: src/UIElements/Makefile.am
===================================================================
--- src/UIElements/Makefile.am	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/Makefile.am	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -108,4 +108,5 @@
   TextUI/TextWindow.cpp
 TEXTUIHEADER = \
+  TextUI/Query/TextQuery.hpp \
   TextUI/TextDialog.hpp \
   TextUI/TextStatusIndicator.hpp \
Index: src/UIElements/TextUI/Query/AtomTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/AtomTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/AtomTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -24,5 +24,5 @@
 #include <Descriptors/AtomDescriptor.hpp>
 #include <Descriptors/AtomIdDescriptor.hpp>
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/AtomsTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/AtomsTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/AtomsTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -22,5 +22,5 @@
 #include <Descriptors/AtomDescriptor.hpp>
 #include <Descriptors/AtomIdDescriptor.hpp>
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/BooleanTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/BooleanTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/BooleanTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -22,5 +22,5 @@
 #include <iostream>
 
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/BoxTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/BoxTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/BoxTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -22,5 +22,5 @@
 #include <iostream>
 
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/DoubleTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/DoubleTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/DoubleTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -22,5 +22,5 @@
 #include <iostream>
 
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/DoublesTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/DoublesTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/DoublesTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -22,5 +22,5 @@
 #include <iostream>
 
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/ElementTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/ElementTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/ElementTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -22,5 +22,5 @@
 #include <iostream>
 
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/ElementsTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/ElementsTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/ElementsTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -23,5 +23,5 @@
 #include <boost/lexical_cast.hpp>
 
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/EmptyTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/EmptyTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/EmptyTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -22,5 +22,5 @@
 #include <iostream>
 
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/FileTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/FileTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/FileTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -24,5 +24,5 @@
 #include <boost/filesystem.hpp>
 
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/IntTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/IntTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/IntTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -22,5 +22,5 @@
 #include <iostream>
 
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/IntsTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/IntsTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/IntsTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -22,5 +22,5 @@
 #include <iostream>
 
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/MoleculeTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/MoleculeTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/MoleculeTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -24,5 +24,5 @@
 #include <Descriptors/MoleculeDescriptor.hpp>
 #include <Descriptors/MoleculeIdDescriptor.hpp>
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/MoleculesTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/MoleculesTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/MoleculesTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -24,5 +24,5 @@
 #include <Descriptors/MoleculeDescriptor.hpp>
 #include <Descriptors/MoleculeIdDescriptor.hpp>
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/StringTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/StringTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/StringTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -22,5 +22,5 @@
 #include <iostream>
 
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/StringsTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/StringsTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/StringsTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -22,5 +22,5 @@
 #include <iostream>
 
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/TextQuery.hpp
===================================================================
--- src/UIElements/TextUI/Query/TextQuery.hpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
+++ src/UIElements/TextUI/Query/TextQuery.hpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -0,0 +1,139 @@
+/*
+ * TextQuery.hpp
+ *
+ *  Created on: Nov 8, 2010
+ *      Author: heber
+ */
+
+#ifndef TEXTQUERY_HPP_
+#define TEXTQUERY_HPP_
+
+#include "TextUI/TextDialog.hpp"
+
+class TextDialog::AtomTextQuery : public Dialog::AtomQuery {
+public:
+  AtomTextQuery(std::string title, std::string _description = NULL);
+  virtual ~AtomTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::AtomsTextQuery : public Dialog::AtomsQuery {
+public:
+  AtomsTextQuery(std::string title, std::string _description = NULL);
+  virtual ~AtomsTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::BooleanTextQuery : public Dialog::BooleanQuery {
+public:
+  BooleanTextQuery(std::string title, std::string _description = NULL);
+  virtual ~BooleanTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::BoxTextQuery : public Dialog::BoxQuery {
+public:
+  BoxTextQuery(std::string title, std::string _description = NULL);
+  virtual ~BoxTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::DoubleTextQuery : public Dialog::DoubleQuery {
+public:
+  DoubleTextQuery(std::string title, std::string _description = NULL);
+  virtual ~DoubleTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::DoublesTextQuery : public Dialog::DoublesQuery {
+public:
+  DoublesTextQuery(std::string title, std::string _description = NULL);
+  virtual ~DoublesTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::ElementTextQuery : public Dialog::ElementQuery {
+public:
+  ElementTextQuery(std::string title, std::string _description = NULL);
+  virtual ~ElementTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::ElementsTextQuery : public Dialog::ElementsQuery {
+public:
+  ElementsTextQuery(std::string title, std::string _description = NULL);
+  virtual ~ElementsTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::EmptyTextQuery : public Dialog::EmptyQuery {
+public:
+  EmptyTextQuery(std::string title, std::string _description = NULL);
+  virtual ~EmptyTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::FileTextQuery : public Dialog::FileQuery {
+public:
+  FileTextQuery(std::string title, std::string _description = NULL);
+  virtual ~FileTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::IntTextQuery : public Dialog::IntQuery {
+public:
+  IntTextQuery(std::string title, std::string _description = NULL);
+  virtual ~IntTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::IntsTextQuery : public Dialog::IntsQuery {
+public:
+  IntsTextQuery(std::string title, std::string _description = NULL);
+  virtual ~IntsTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::MoleculeTextQuery : public Dialog::MoleculeQuery {
+public:
+  MoleculeTextQuery(std::string title, std::string _description = NULL);
+  virtual ~MoleculeTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::MoleculesTextQuery : public Dialog::MoleculesQuery {
+public:
+  MoleculesTextQuery(std::string title, std::string _description = NULL);
+  virtual ~MoleculesTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::StringTextQuery : public Dialog::StringQuery {
+public:
+  StringTextQuery(std::string title, std::string _description = NULL);
+  virtual ~StringTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::StringsTextQuery : public Dialog::StringsQuery {
+public:
+  StringsTextQuery(std::string title, std::string _description = NULL);
+  virtual ~StringsTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::VectorTextQuery : public Dialog::VectorQuery {
+public:
+  VectorTextQuery(std::string title,bool _check, std::string _description = NULL);
+  virtual ~VectorTextQuery();
+  virtual bool handle();
+};
+
+class TextDialog::VectorsTextQuery : public Dialog::VectorsQuery {
+public:
+  VectorsTextQuery(std::string title,bool _check, std::string _description = NULL);
+  virtual ~VectorsTextQuery();
+  virtual bool handle();
+};
+
+#endif /* TEXTQUERY_HPP_ */
Index: src/UIElements/TextUI/Query/VectorTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/VectorTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/VectorTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -22,5 +22,5 @@
 #include <iostream>
 
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/Query/VectorsTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/VectorsTextQuery.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/Query/VectorsTextQuery.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -22,5 +22,5 @@
 #include <iostream>
 
-#include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 #include "Helpers/Log.hpp"
Index: src/UIElements/TextUI/TextDialog.cpp
===================================================================
--- src/UIElements/TextUI/TextDialog.cpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/TextDialog.cpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -21,4 +21,5 @@
 
 #include "TextUI/TextDialog.hpp"
+#include "TextUI/Query/TextQuery.hpp"
 
 using namespace std;
Index: src/UIElements/TextUI/TextDialog.hpp
===================================================================
--- src/UIElements/TextUI/TextDialog.hpp	(revision 3a21a725fe8654c46053fbab3d721519872c4fa0)
+++ src/UIElements/TextUI/TextDialog.hpp	(revision 738ae1e8b6d1be253565c15e50c3cb7b0cdfabba)
@@ -45,129 +45,24 @@
 protected:
   // specialized stuff for text queries
-  class EmptyTextQuery : public Dialog::EmptyQuery {
-  public:
-    EmptyTextQuery(std::string title, std::string _description = NULL);
-    virtual ~EmptyTextQuery();
-    virtual bool handle();
-  };
-
-  class BooleanTextQuery : public Dialog::BooleanQuery {
-  public:
-    BooleanTextQuery(std::string title, std::string _description = NULL);
-    virtual ~BooleanTextQuery();
-    virtual bool handle();
-  };
-
-  class IntTextQuery : public Dialog::IntQuery {
-  public:
-    IntTextQuery(std::string title, std::string _description = NULL);
-    virtual ~IntTextQuery();
-    virtual bool handle();
-  };
-
-  class IntsTextQuery : public Dialog::IntsQuery {
-  public:
-    IntsTextQuery(std::string title, std::string _description = NULL);
-    virtual ~IntsTextQuery();
-    virtual bool handle();
-  };
-
-  class DoubleTextQuery : public Dialog::DoubleQuery {
-  public:
-    DoubleTextQuery(std::string title, std::string _description = NULL);
-    virtual ~DoubleTextQuery();
-    virtual bool handle();
-  };
-
-  class DoublesTextQuery : public Dialog::DoublesQuery {
-  public:
-    DoublesTextQuery(std::string title, std::string _description = NULL);
-    virtual ~DoublesTextQuery();
-    virtual bool handle();
-  };
-
-  class StringTextQuery : public Dialog::StringQuery {
-  public:
-    StringTextQuery(std::string title, std::string _description = NULL);
-    virtual ~StringTextQuery();
-    virtual bool handle();
-  };
-
-  class StringsTextQuery : public Dialog::StringsQuery {
-  public:
-    StringsTextQuery(std::string title, std::string _description = NULL);
-    virtual ~StringsTextQuery();
-    virtual bool handle();
-  };
-
-  class AtomTextQuery : public Dialog::AtomQuery {
-  public:
-    AtomTextQuery(std::string title, std::string _description = NULL);
-    virtual ~AtomTextQuery();
-    virtual bool handle();
-  };
-
-  class AtomsTextQuery : public Dialog::AtomsQuery {
-  public:
-    AtomsTextQuery(std::string title, std::string _description = NULL);
-    virtual ~AtomsTextQuery();
-    virtual bool handle();
-  };
-
-  class MoleculeTextQuery : public Dialog::MoleculeQuery {
-  public:
-    MoleculeTextQuery(std::string title, std::string _description = NULL);
-    virtual ~MoleculeTextQuery();
-    virtual bool handle();
-  };
-
-  class MoleculesTextQuery : public Dialog::MoleculesQuery {
-  public:
-    MoleculesTextQuery(std::string title, std::string _description = NULL);
-    virtual ~MoleculesTextQuery();
-    virtual bool handle();
-  };
-
-  class VectorTextQuery : public Dialog::VectorQuery {
-  public:
-    VectorTextQuery(std::string title,bool _check, std::string _description = NULL);
-    virtual ~VectorTextQuery();
-    virtual bool handle();
-  };
-
-  class VectorsTextQuery : public Dialog::VectorsQuery {
-  public:
-    VectorsTextQuery(std::string title,bool _check, std::string _description = NULL);
-    virtual ~VectorsTextQuery();
-    virtual bool handle();
-  };
-
-  class BoxTextQuery : public Dialog::BoxQuery {
-  public:
-    BoxTextQuery(std::string title, std::string _description = NULL);
-    virtual ~BoxTextQuery();
-    virtual bool handle();
-  };
-
-  class ElementTextQuery : public Dialog::ElementQuery {
-  public:
-    ElementTextQuery(std::string title, std::string _description = NULL);
-    virtual ~ElementTextQuery();
-    virtual bool handle();
-  };
-
-  class ElementsTextQuery : public Dialog::ElementsQuery {
-  public:
-    ElementsTextQuery(std::string title, std::string _description = NULL);
-    virtual ~ElementsTextQuery();
-    virtual bool handle();
-  };
-
-  class FileTextQuery : public Dialog::FileQuery {
-  public:
-    FileTextQuery(std::string title, std::string _description = NULL);
-    virtual ~FileTextQuery();
-    virtual bool handle();
-  };
+  // all placed into Query/TextQuery.hpp
+  // !please adhere to alphabetical ordering!
+  class AtomTextQuery;
+  class AtomsTextQuery;
+  class BooleanTextQuery;
+  class BoxTextQuery;
+  class DoubleTextQuery;
+  class DoublesTextQuery;
+  class ElementTextQuery;
+  class ElementsTextQuery;
+  class EmptyTextQuery;
+  class FileTextQuery;
+  class IntTextQuery;
+  class IntsTextQuery;
+  class MoleculeTextQuery;
+  class MoleculesTextQuery;
+  class StringTextQuery;
+  class StringsTextQuery;
+  class VectorTextQuery;
+  class VectorsTextQuery;
 };
 
