Index: src/UIElements/CommandLineUI/CommandLineDialog.cpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineDialog.cpp	(revision b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/UIElements/CommandLineUI/CommandLineDialog.cpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -27,4 +27,5 @@
 #include "verbose.hpp"
 #include "World.hpp"
+#include "Box.hpp"
 
 #include "atom.hpp"
@@ -77,9 +78,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));
 }
@@ -222,6 +223,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)
 {}
 
@@ -244,5 +245,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 b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/UIElements/CommandLineUI/CommandLineDialog.hpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -35,6 +35,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 = "");
 
@@ -99,5 +99,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();
@@ -106,5 +106,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 b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/UIElements/Dialog.cpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -10,8 +10,11 @@
 #include "Dialog.hpp"
 
+#include "verbose.hpp"
 #include "atom.hpp"
 #include "element.hpp"
 #include "molecule.hpp"
 #include "vector.hpp"
+#include "Matrix.hpp"
+#include "Box.hpp"
 
 using namespace std;
@@ -185,7 +188,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)
@@ -205,5 +207,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)
@@ -218,7 +220,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 b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/UIElements/Dialog.hpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -14,4 +14,5 @@
 
 class atom;
+class Box;
 class element;
 class molecule;
@@ -43,6 +44,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;
 
@@ -176,5 +177,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;
@@ -182,5 +183,4 @@
     protected:
       Vector *tmp;
-      const double *const cellSize;
       bool check;
     private:
@@ -190,12 +190,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/QT4/QTDialog.cpp
===================================================================
--- src/UIElements/QT4/QTDialog.cpp	(revision b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/UIElements/QT4/QTDialog.cpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -29,4 +29,6 @@
 #include "molecule.hpp"
 #include "Descriptors/MoleculeIdDescriptor.hpp"
+#include "Matrix.hpp"
+#include "Box.hpp"
 
 
@@ -93,5 +95,5 @@
 }
 
-void QTDialog::queryBox(char const*, double**, string){
+void QTDialog::queryBox(char const*, Box*, string){
   // TODO
   ASSERT(false, "Not implemented yet");
@@ -123,6 +125,6 @@
 }
 
-void QTDialog::queryVector(const char* title, Vector *target,const double *const cellSize, bool check,string) {
-  registerQuery(new VectorQTQuery(title,target,cellSize,check,inputLayout,this));
+void QTDialog::queryVector(const char* title, Vector *target, bool check,string) {
+  registerQuery(new VectorQTQuery(title,target,check,inputLayout,this));
 }
 
@@ -291,10 +293,9 @@
 }
 
-QTDialog::VectorQTQuery::VectorQTQuery(std::string title, Vector *_target, const double *const _cellSize, bool _check,QBoxLayout *_parent,QTDialog *_dialog) :
-    Dialog::VectorQuery(title,_target,_cellSize,_check),
-    parent(_parent)
-{
-  // About the j: I don't know why it was done this way, but it was used this way in Vector::AskPosition, so I reused it
-  int j = -1;
+QTDialog::VectorQTQuery::VectorQTQuery(std::string title, Vector *_target, bool _check,QBoxLayout *_parent,QTDialog *_dialog) :
+    Dialog::VectorQuery(title,_target,_check),
+    parent(_parent)
+{
+  const Matrix& M = World::getInstance().getDomain().getM();
   const char *coords[3] = {"x:","y:","z:"};
   mainLayout= new QHBoxLayout();
@@ -304,5 +305,4 @@
   mainLayout->addLayout(subLayout);
   for(int i=0; i<3; i++) {
-    j+=i+1;
     coordLayout[i] = new QHBoxLayout();
     subLayout->addLayout(coordLayout[i]);
@@ -310,5 +310,5 @@
     coordLayout[i]->addWidget(coordLabel[i]);
     coordInput[i] = new QDoubleSpinBox();
-    coordInput[i]->setRange(0,cellSize[j]);
+    coordInput[i]->setRange(0,M.at(i,i));
     coordInput[i]->setDecimals(3);
     coordLayout[i]->addWidget(coordInput[i]);
Index: src/UIElements/QT4/QTDialog.hpp
===================================================================
--- src/UIElements/QT4/QTDialog.hpp	(revision b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/UIElements/QT4/QTDialog.hpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -43,6 +43,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 *> *_target,std::string = "");
 
@@ -124,5 +124,5 @@
     class VectorQTQuery : public Dialog::VectorQuery {
     public:
-      VectorQTQuery(std::string title,Vector *_target,const double *const _cellSize,bool _check,QBoxLayout *,QTDialog *);
+      VectorQTQuery(std::string title,Vector *_target,bool _check,QBoxLayout *,QTDialog *);
       virtual ~VectorQTQuery();
       virtual bool handle();
Index: src/UIElements/QT4/QTMainWindow.cpp
===================================================================
--- src/UIElements/QT4/QTMainWindow.cpp	(revision b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/UIElements/QT4/QTMainWindow.cpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -21,4 +21,5 @@
 #include "atom.hpp"
 #include "molecule.hpp"
+#include "verbose.hpp"
 #include "Actions/Action.hpp"
 #include "Actions/ActionRegistry.hpp"
Index: src/UIElements/TextUI/TextDialog.cpp
===================================================================
--- src/UIElements/TextUI/TextDialog.cpp	(revision b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/UIElements/TextUI/TextDialog.cpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -25,4 +25,6 @@
 #include "molecule.hpp"
 #include "vector.hpp"
+#include "Matrix.hpp"
+#include "Box.hpp"
 
 using namespace std;
@@ -70,9 +72,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));
 }
@@ -270,6 +272,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)
 {}
 
@@ -280,17 +282,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 b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/UIElements/TextUI/TextDialog.hpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -32,6 +32,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 = "");
 
@@ -96,5 +96,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();
@@ -103,5 +103,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();
Index: src/UIElements/TextUI/TextWindow.hpp
===================================================================
--- src/UIElements/TextUI/TextWindow.hpp	(revision b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/UIElements/TextUI/TextWindow.hpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -11,4 +11,5 @@
 #include "MainWindow.hpp"
 
+#include <string>
 #include <set>
 
Index: src/UIElements/Views/StreamStringView.hpp
===================================================================
--- src/UIElements/Views/StreamStringView.hpp	(revision b9c8477258cb157c5302eaf6c3b8c3a846877820)
+++ src/UIElements/Views/StreamStringView.hpp	(revision 77a57041dc97cf87e9319cb8d08b0533fc2078e5)
@@ -10,5 +10,5 @@
 
 #include <boost/function.hpp>
-#include <iostream>
+#include <iosfwd>
 
 #include "Views/StringView.hpp"
