Index: src/UIElements/CommandLineUI/CommandLineDialog.cpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineDialog.cpp	(revision daa5f1c954173ff3503ce39d99851286b9775f32)
+++ src/UIElements/CommandLineUI/CommandLineDialog.cpp	(revision 4907a3bc2ada49ac58ab09c7e207c9d34f641fd0)
@@ -27,4 +27,5 @@
 #include "verbose.hpp"
 #include "World.hpp"
+#include "Box.hpp"
 
 #include "atom.hpp"
@@ -73,9 +74,9 @@
 }
 
-void CommandLineDialog::queryVector(const char* title, Vector *target,const double *const cellSize, bool check, string _description) {
-  registerQuery(new VectorCommandLineQuery(title,target,cellSize,check, _description));
-}
-
-void CommandLineDialog::queryBox(const char* title, double ** const cellSize, string _description) {
+void CommandLineDialog::queryVector(const char* title, Vector *target, bool check, string _description) {
+  registerQuery(new VectorCommandLineQuery(title,target,check, _description));
+}
+
+void CommandLineDialog::queryBox(const char* title, Box* cellSize, string _description) {
   registerQuery(new BoxCommandLineQuery(title,cellSize,_description));
 }
@@ -202,6 +203,6 @@
 }
 
-CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery(string title, Vector *_target, const double *const _cellSize, bool _check, string _description) :
-    Dialog::VectorQuery(title,_target,_cellSize,_check, _description)
+CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery(string title, Vector *_target, bool _check, string _description) :
+    Dialog::VectorQuery(title,_target,_check, _description)
 {}
 
@@ -224,5 +225,5 @@
 
 
-CommandLineDialog::BoxCommandLineQuery::BoxCommandLineQuery(string title, double ** const _cellSize, string _description) :
+CommandLineDialog::BoxCommandLineQuery::BoxCommandLineQuery(string title, Box* _cellSize, string _description) :
     Dialog::BoxQuery(title,_cellSize, _description)
 {}
Index: src/UIElements/CommandLineUI/CommandLineDialog.hpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineDialog.hpp	(revision daa5f1c954173ff3503ce39d99851286b9775f32)
+++ src/UIElements/CommandLineUI/CommandLineDialog.hpp	(revision 4907a3bc2ada49ac58ab09c7e207c9d34f641fd0)
@@ -34,6 +34,6 @@
   virtual void queryAtom(const char*,atom**, std::string = "");
   virtual void queryMolecule(const char*,molecule**,std::string = "");
-  virtual void queryVector(const char*,Vector *,const double * const,bool, std::string = "");
-  virtual void queryBox(const char*,double ** const, std::string = "");
+  virtual void queryVector(const char*,Vector *,bool, std::string = "");
+  virtual void queryBox(const char*,Box *, std::string = "");
   virtual void queryElement(const char*, std::vector<element *> *, std::string = "");
 
@@ -91,5 +91,5 @@
   class VectorCommandLineQuery : public Dialog::VectorQuery {
   public:
-    VectorCommandLineQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check, std::string _description = "");
+    VectorCommandLineQuery(std::string title,Vector *_target,bool _check, std::string _description = "");
     virtual ~VectorCommandLineQuery();
     virtual bool handle();
@@ -98,5 +98,5 @@
   class BoxCommandLineQuery : public Dialog::BoxQuery {
   public:
-    BoxCommandLineQuery(std::string title,double ** const _cellSize, std::string _description = "");
+    BoxCommandLineQuery(std::string title,Box* _cellSize, std::string _description = "");
     virtual ~BoxCommandLineQuery();
     virtual bool handle();
Index: src/UIElements/Dialog.cpp
===================================================================
--- src/UIElements/Dialog.cpp	(revision daa5f1c954173ff3503ce39d99851286b9775f32)
+++ src/UIElements/Dialog.cpp	(revision 4907a3bc2ada49ac58ab09c7e207c9d34f641fd0)
@@ -14,4 +14,6 @@
 #include "molecule.hpp"
 #include "vector.hpp"
+#include "Matrix.hpp"
+#include "Box.hpp"
 
 using namespace std;
@@ -162,7 +164,6 @@
 // Vector Queries
 
-Dialog::VectorQuery::VectorQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check, std::string _description) :
+Dialog::VectorQuery::VectorQuery(std::string title,Vector *_target,bool _check, std::string _description) :
   Query(title, _description),
-  cellSize(_cellSize),
   check(_check),
   target(_target)
@@ -182,5 +183,5 @@
 // Box Queries
 
-Dialog::BoxQuery::BoxQuery(std::string title, double ** const _cellSize, std::string _description) :
+Dialog::BoxQuery::BoxQuery(std::string title, Box* _cellSize, std::string _description) :
   Query(title, _description),
   target(_cellSize)
@@ -195,7 +196,5 @@
 
 void Dialog::BoxQuery::setResult() {
-  for (int i=0;i<6;i++) {
-    (*target)[i] = tmp[i];
-  }
+  (*target)= ReturnFullMatrixforSymmetric(tmp);
 }
 
Index: src/UIElements/Dialog.hpp
===================================================================
--- src/UIElements/Dialog.hpp	(revision daa5f1c954173ff3503ce39d99851286b9775f32)
+++ src/UIElements/Dialog.hpp	(revision 4907a3bc2ada49ac58ab09c7e207c9d34f641fd0)
@@ -14,4 +14,5 @@
 
 class atom;
+class Box;
 class element;
 class molecule;
@@ -31,6 +32,6 @@
   virtual void queryAtom(const char*,atom**,std::string = "")=0;
   virtual void queryMolecule(const char*,molecule**, std::string = "")=0;
-  virtual void queryVector(const char*,Vector *,const double *const,bool, std::string = "")=0;
-  virtual void queryBox(const char*,double ** const, std::string = "")=0;
+  virtual void queryVector(const char*,Vector *,bool, std::string = "")=0;
+  virtual void queryBox(const char*,Box*, std::string = "")=0;
   virtual void queryElement(const char*, std::vector<element *> *, std::string = "")=0;
 
@@ -148,5 +149,5 @@
   class VectorQuery : public Query {
   public:
-      VectorQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check, std::string _description = "");
+      VectorQuery(std::string title,Vector *_target,bool _check, std::string _description = "");
       virtual ~VectorQuery();
       virtual bool handle()=0;
@@ -154,5 +155,4 @@
     protected:
       Vector *tmp;
-      const double *const cellSize;
       bool check;
     private:
@@ -162,12 +162,12 @@
   class BoxQuery : public Query {
   public:
-      BoxQuery(std::string title,double ** const _cellSize, std::string _description = "");
+      BoxQuery(std::string title,Box *_cellSize, std::string _description = "");
       virtual ~BoxQuery();
       virtual bool handle()=0;
       virtual void setResult();
     protected:
-      double *tmp;
+      double* tmp;
     private:
-      double **target;
+      Box* target;
   };
 
Index: src/UIElements/TextUI/TextDialog.cpp
===================================================================
--- src/UIElements/TextUI/TextDialog.cpp	(revision daa5f1c954173ff3503ce39d99851286b9775f32)
+++ src/UIElements/TextUI/TextDialog.cpp	(revision 4907a3bc2ada49ac58ab09c7e207c9d34f641fd0)
@@ -25,4 +25,6 @@
 #include "molecule.hpp"
 #include "vector.hpp"
+#include "Matrix.hpp"
+#include "Box.hpp"
 
 using namespace std;
@@ -66,9 +68,9 @@
 }
 
-void TextDialog::queryVector(const char* title, Vector *target,const double *const cellSize, bool check, string description) {
-  registerQuery(new VectorTextQuery(title,target,cellSize,check,description));
-}
-
-void TextDialog::queryBox(const char* title,double ** const cellSize, string description) {
+void TextDialog::queryVector(const char* title, Vector *target, bool check, string description) {
+  registerQuery(new VectorTextQuery(title,target,check,description));
+}
+
+void TextDialog::queryBox(const char* title,Box* cellSize, string description) {
   registerQuery(new BoxTextQuery(title,cellSize,description));
 }
@@ -243,6 +245,6 @@
 }
 
-TextDialog::VectorTextQuery::VectorTextQuery(std::string title, Vector *_target, const double *const _cellSize, bool _check, std::string _description) :
-    Dialog::VectorQuery(title,_target,_cellSize,_check,_description)
+TextDialog::VectorTextQuery::VectorTextQuery(std::string title, Vector *_target, bool _check, std::string _description) :
+    Dialog::VectorQuery(title,_target,_check,_description)
 {}
 
@@ -253,17 +255,16 @@
   Log() << Verbose(0) << getTitle();
 
+  const Matrix &M = World::getInstance().getDomain().getM();
   char coords[3] = {'x','y','z'};
-  int j = -1;
   for (int i=0;i<3;i++) {
-    j += i+1;
     do {
-      Log() << Verbose(0) << coords[i] << "[0.." << cellSize[j] << "]: ";
+      Log() << Verbose(0) << coords[i] << "[0.." << M.at(i,i) << "]: ";
       cin >> (*tmp)[i];
-    } while ((((*tmp)[i] < 0) || ((*tmp)[i] >= cellSize[j])) && (check));
+    } while ((((*tmp)[i] < 0) || ((*tmp)[i] >= M.at(i,i))) && (check));
   }
   return true;
 }
 
-TextDialog::BoxTextQuery::BoxTextQuery(std::string title, double ** const _cellSize, std::string _description) :
+TextDialog::BoxTextQuery::BoxTextQuery(std::string title, Box* _cellSize, std::string _description) :
     Dialog::BoxQuery(title,_cellSize,_description)
 {}
Index: src/UIElements/TextUI/TextDialog.hpp
===================================================================
--- src/UIElements/TextUI/TextDialog.hpp	(revision daa5f1c954173ff3503ce39d99851286b9775f32)
+++ src/UIElements/TextUI/TextDialog.hpp	(revision 4907a3bc2ada49ac58ab09c7e207c9d34f641fd0)
@@ -31,6 +31,6 @@
   virtual void queryAtom(const char*,atom**,std::string = "");
   virtual void queryMolecule(const char*,molecule**,std::string = "");
-  virtual void queryVector(const char*,Vector *,const double * const,bool, std::string = "");
-  virtual void queryBox(const char*,double ** const, std::string = "");
+  virtual void queryVector(const char*,Vector *,bool, std::string = "");
+  virtual void queryBox(const char*,Box*, std::string = "");
   virtual void queryElement(const char*, std::vector<element *> *, std::string = "");
 
@@ -88,5 +88,5 @@
   class VectorTextQuery : public Dialog::VectorQuery {
   public:
-    VectorTextQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check, std::string _description = NULL);
+    VectorTextQuery(std::string title,Vector *_target,bool _check, std::string _description = NULL);
     virtual ~VectorTextQuery();
     virtual bool handle();
@@ -95,5 +95,5 @@
   class BoxTextQuery : public Dialog::BoxQuery {
   public:
-    BoxTextQuery(std::string title,double ** const _cellSize, std::string _description = NULL);
+    BoxTextQuery(std::string title,Box* _cellSize, std::string _description = NULL);
     virtual ~BoxTextQuery();
     virtual bool handle();
