Index: src/UIElements/CommandLineUI/CommandLineDialog.cpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineDialog.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/CommandLineDialog.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -40,86 +40,86 @@
 }
 
-void CommandLineDialog::queryInt(const char* title, std::string _description){
-  registerQuery(new IntCommandLineQuery(title, _description));
+void CommandLineDialog::queryInt(Parameter<int> &param, const char* title, std::string _description){
+  registerQuery(new IntCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryInts(const char* title, std::string _description){
-  registerQuery(new IntsCommandLineQuery(title, _description));
+void CommandLineDialog::queryInts(Parameter<std::vector<int> > &param, const char* title, std::string _description){
+  registerQuery(new IntsCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryUnsignedInt(const char* title, std::string _description){
-  registerQuery(new UnsignedIntCommandLineQuery(title, _description));
+void CommandLineDialog::queryUnsignedInt(Parameter<unsigned int> &param, const char* title, std::string _description){
+  registerQuery(new UnsignedIntCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryUnsignedInts(const char* title, std::string _description){
-  registerQuery(new UnsignedIntsCommandLineQuery(title, _description));
+void CommandLineDialog::queryUnsignedInts(Parameter<std::vector<unsigned int> > &param, const char* title, std::string _description){
+  registerQuery(new UnsignedIntsCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryBoolean(const char* title, std::string _description){
-  registerQuery(new BooleanCommandLineQuery(title, _description));
+void CommandLineDialog::queryBoolean(Parameter<bool> &param, const char* title, std::string _description){
+  registerQuery(new BooleanCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryDouble(const char* title, std::string _description){
-  registerQuery(new DoubleCommandLineQuery(title, _description));
+void CommandLineDialog::queryDouble(Parameter<double> &param, const char* title, std::string _description){
+  registerQuery(new DoubleCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryDoubles(const char* title, std::string _description){
-  registerQuery(new DoublesCommandLineQuery(title, _description));
+void CommandLineDialog::queryDoubles(Parameter<std::vector<double> > &param, const char* title, std::string _description){
+  registerQuery(new DoublesCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryString(const char* title, std::string _description){
-  registerQuery(new StringCommandLineQuery(title, _description));
+void CommandLineDialog::queryString(Parameter<std::string> &param, const char* title, std::string _description){
+  registerQuery(new StringCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryStrings(const char* title, std::string _description){
-  registerQuery(new StringsCommandLineQuery(title, _description));
+void CommandLineDialog::queryStrings(Parameter<std::vector<std::string> > &param, const char* title, std::string _description){
+  registerQuery(new StringsCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryAtom(const char* title, std::string _description) {
-  registerQuery(new AtomCommandLineQuery(title, _description));
+void CommandLineDialog::queryAtom(Parameter<const atom *> &param, const char* title, std::string _description) {
+  registerQuery(new AtomCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryAtoms(const char* title, std::string _description) {
-  registerQuery(new AtomsCommandLineQuery(title, _description));
+void CommandLineDialog::queryAtoms(Parameter<std::vector<const atom *> > &param, const char* title, std::string _description) {
+  registerQuery(new AtomsCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryMolecule(const char* title, std::string _description) {
-  registerQuery(new MoleculeCommandLineQuery(title, _description));
+void CommandLineDialog::queryMolecule(Parameter<const molecule *> &param, const char* title, std::string _description) {
+  registerQuery(new MoleculeCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryMolecules(const char* title, std::string _description) {
-  registerQuery(new MoleculesCommandLineQuery(title, _description));
+void CommandLineDialog::queryMolecules(Parameter<std::vector<const molecule *> > &param, const char* title, std::string _description) {
+  registerQuery(new MoleculesCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryVector(const char* title, bool check, std::string _description) {
-  registerQuery(new VectorCommandLineQuery(title,check, _description));
+void CommandLineDialog::queryVector(Parameter<Vector> &param, const char* title, bool check, std::string _description) {
+  registerQuery(new VectorCommandLineQuery(param, title,check, _description));
 }
 
-void CommandLineDialog::queryVectors(const char* title, bool check, std::string _description) {
-  registerQuery(new VectorsCommandLineQuery(title,check, _description));
+void CommandLineDialog::queryVectors(Parameter<std::vector<Vector> > &param, const char* title, bool check, std::string _description) {
+  registerQuery(new VectorsCommandLineQuery(param, title,check, _description));
 }
 
-void CommandLineDialog::queryBox(const char* title, std::string _description) {
-  registerQuery(new BoxCommandLineQuery(title,_description));
+void CommandLineDialog::queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &param, const char* title, std::string _description) {
+  registerQuery(new RealSpaceMatrixCommandLineQuery(param, title,_description));
 }
 
-void CommandLineDialog::queryElement(const char* title, std::string _description){
-  registerQuery(new ElementCommandLineQuery(title, _description));
+void CommandLineDialog::queryElement(Parameter<const element *> &param, const char* title, std::string _description){
+  registerQuery(new ElementCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryElements(const char* title, std::string _description){
-  registerQuery(new ElementsCommandLineQuery(title, _description));
+void CommandLineDialog::queryElements(Parameter<std::vector<const element *> > &param, const char* title, std::string _description){
+  registerQuery(new ElementsCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryFile(const char* title, std::string _description){
-  registerQuery(new FileCommandLineQuery(title, _description));
+void CommandLineDialog::queryFile(Parameter<boost::filesystem::path> &param, const char* title, std::string _description){
+  registerQuery(new FileCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryFiles(const char* title, std::string _description){
-  registerQuery(new FilesCommandLineQuery(title, _description));
+void CommandLineDialog::queryFiles(Parameter<std::vector< boost::filesystem::path> > &param, const char* title, std::string _description){
+  registerQuery(new FilesCommandLineQuery(param, title, _description));
 }
 
-void CommandLineDialog::queryRandomNumberDistribution_Parameters(const char* title, std::string _description){
-  registerQuery(new RandomNumberDistribution_ParametersCommandLineQuery(title, _description));
+void CommandLineDialog::queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> &param, const char* title, std::string _description){
+  registerQuery(new RandomNumberDistribution_ParametersCommandLineQuery(param, title, _description));
 }
 
Index: src/UIElements/CommandLineUI/CommandLineDialog.hpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineDialog.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/CommandLineDialog.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -34,26 +34,25 @@
 
   virtual void queryEmpty(const char *, std::string = "");
-  virtual void queryInt(const char *, std::string = "");
-  virtual void queryInts(const char *, std::string = "");
-  virtual void queryUnsignedInt(const char *, std::string = "");
-  virtual void queryUnsignedInts(const char *, std::string = "");
-  virtual void queryBoolean(const char *, std::string = "");
-  virtual void queryString(const char*, std::string = "");
-  virtual void queryStrings(const char*, std::string = "");
-  virtual void queryDouble(const char*, std::string = "");
-  virtual void queryDoubles(const char*, std::string = "");
-  virtual void queryAtom(const char*, std::string = "");
-  virtual void queryAtoms(const char*, std::string = "");
-  virtual void queryMolecule(const char*, std::string = "");
-  virtual void queryMolecules(const char*, std::string = "");
-  virtual void queryVector(const char*, bool, std::string = "");
-  virtual void queryVectors(const char*, bool, std::string = "");
-  virtual void queryBox(const char*, std::string = "");
-  virtual void queryElement(const char*, std::string = "");
-  virtual void queryElements(const char*, std::string = "");
-  virtual void queryFile(const char*, std::string = "");
-  virtual void queryFiles(const char*, std::string = "");
-  virtual void queryRandomNumberDistribution_Parameters(const char*, std::string = "");
-protected:
+  virtual void queryInt(Parameter<int> &, const char *, std::string = "");
+  virtual void queryInts(Parameter<std::vector<int> > &, const char *, std::string = "");
+  virtual void queryUnsignedInt(Parameter<unsigned int> &, const char *, std::string = "");
+  virtual void queryUnsignedInts(Parameter<std::vector<unsigned int> > &, const char *, std::string = "");
+  virtual void queryBoolean(Parameter<bool> &, const char *, std::string = "");
+  virtual void queryString(Parameter<std::string> &, const char*, std::string = "");
+  virtual void queryStrings(Parameter<std::vector<std::string> > &, const char*, std::string = "");
+  virtual void queryDouble(Parameter<double> &, const char*, std::string = "");
+  virtual void queryDoubles(Parameter<std::vector<double> > &, const char*, std::string = "");
+  virtual void queryAtom(Parameter<const atom *> &, const char*, std::string = "");
+  virtual void queryAtoms(Parameter<std::vector<const atom *> > &, const char*, std::string = "");
+  virtual void queryMolecule(Parameter<const molecule *> &, const char*, std::string = "");
+  virtual void queryMolecules(Parameter<std::vector<const molecule *> > &, const char*, std::string = "");
+  virtual void queryVector(Parameter<Vector> &, const char*, bool, std::string = "");
+  virtual void queryVectors(Parameter<std::vector<Vector> > &, const char*, bool, std::string = "");
+  virtual void queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &, const char*, std::string = "");
+  virtual void queryElement(Parameter<const element *> &, const char*, std::string = "");
+  virtual void queryElements(Parameter<std::vector<const element *> > &, const char*, std::string = "");
+  virtual void queryFile(Parameter<boost::filesystem::path> &, const char*, std::string = "");
+  virtual void queryFiles(Parameter<std::vector< boost::filesystem::path> > &, const char*, std::string = "");
+  virtual void queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> &, const char*, std::string = "");
   // specialized stuff for command line queries
   // all placed into Query/CommandLineQuery.hpp
@@ -62,5 +61,4 @@
   class AtomsCommandLineQuery;
   class BooleanCommandLineQuery;
-  class BoxCommandLineQuery;
   class DoubleCommandLineQuery;
   class DoublesCommandLineQuery;
@@ -74,4 +72,5 @@
   class MoleculeCommandLineQuery;
   class MoleculesCommandLineQuery;
+  class RealSpaceMatrixCommandLineQuery;
   class StringCommandLineQuery;
   class StringsCommandLineQuery;
Index: src/UIElements/CommandLineUI/CommandLineParser.cpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineParser.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/CommandLineParser.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -193,13 +193,4 @@
         ;
       break;
-    case TypeEnumContainer::BoxType:
-      OptionList->add_options()
-        (currentOption->getKeyAndShortForm().c_str(),
-//            currentOption->hasDefaultValue() ?
-//                  po::value < BoxValue >()->default_value(boost::lexical_cast<BoxValue>(currentOption->getDefaultValue().c_str())) :
-                  po::value < BoxValue >(),
-                  currentOption->getDescription().c_str())
-        ;
-      break;
     case TypeEnumContainer::FileType:
       OptionList->add_options()
@@ -370,4 +361,13 @@
                   po::value < std::string >()->default_value(boost::lexical_cast< std::string >(currentOption->getDefaultValue().c_str())) :
                   po::value < std::string >(),
+                  currentOption->getDescription().c_str())
+        ;
+      break;
+    case TypeEnumContainer::RealSpaceMatrixType:
+      OptionList->add_options()
+        (currentOption->getKeyAndShortForm().c_str(),
+//            currentOption->hasDefaultValue() ?
+//                  po::value < RealSpaceMatrixValue >()->default_value(boost::lexical_cast<BoxValue>(currentOption->getDefaultValue().c_str())) :
+                  po::value < RealSpaceMatrixValue >(),
                   currentOption->getDescription().c_str())
         ;
Index: src/UIElements/CommandLineUI/CommandLineParser_validate.cpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineParser_validate.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/CommandLineParser_validate.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -84,7 +84,7 @@
 }
 
-void validate(boost::any& v, const std::vector<std::string>& values, BoxValue *, int)
+void validate(boost::any& v, const std::vector<std::string>& values, RealSpaceMatrixValue *, int)
 {
-  BoxValue BV;
+  RealSpaceMatrixValue RSMV;
   std::vector<std::string> components;
 
@@ -129,6 +129,6 @@
   }
   for (size_t i=0;i<(NDIM*(NDIM+1))/2; ++i)
-    BV.matrix[i] = boost::lexical_cast<double>(components.at(i));
-  v = boost::any(BoxValue(BV));
+    RSMV.matrix[i] = boost::lexical_cast<double>(components.at(i));
+  v = boost::any(RealSpaceMatrixValue(RSMV));
 }
 
Index: src/UIElements/CommandLineUI/CommandLineParser_validate.hpp
===================================================================
--- src/UIElements/CommandLineUI/CommandLineParser_validate.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/CommandLineParser_validate.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -22,9 +22,9 @@
 #include <boost/lexical_cast.hpp>
 
-class BoxValue;
+class RealSpaceMatrixValue;
 class VectorValue;
 
 void validate(boost::any& v, const std::vector<std::string>& values, VectorValue *, int);
-void validate(boost::any& v, const std::vector<std::string>& values, BoxValue *, int);
+void validate(boost::any& v, const std::vector<std::string>& values, RealSpaceMatrixValue *, int);
 void validate(boost::any& v, const std::vector<std::string>& values, boost::filesystem::path *, int);
 
Index: src/UIElements/CommandLineUI/Query/AtomCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/AtomCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/AtomCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -33,6 +33,6 @@
 using namespace std;
 
-CommandLineDialog::AtomCommandLineQuery::AtomCommandLineQuery(std::string title, std::string _description) :
-    Dialog::AtomQuery(title, _description)
+CommandLineDialog::AtomCommandLineQuery::AtomCommandLineQuery(Parameter<const atom *> &param, std::string title, std::string _description) :
+    Dialog::AtomQuery(param, title, _description)
 {}
 
@@ -43,5 +43,5 @@
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
     IdxOfAtom = CommandLineParser::getInstance().vm[getTitle()].as<int>();
-    tmp = World::getInstance().getAtom(AtomById(IdxOfAtom));
+    tmp.set(World::getInstance().getAtom(AtomById(IdxOfAtom)));
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/AtomsCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/AtomsCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/AtomsCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,6 +28,6 @@
 #include "World.hpp"
 
-CommandLineDialog::AtomsCommandLineQuery::AtomsCommandLineQuery(std::string title, std::string _description) :
-    Dialog::AtomsQuery(title, _description)
+CommandLineDialog::AtomsCommandLineQuery::AtomsCommandLineQuery(Parameter<std::vector<const atom *> > &param, std::string title, std::string _description) :
+    Dialog::AtomsQuery(param, title, _description)
 {}
 
@@ -38,9 +38,11 @@
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
     IdxOfAtom = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >();
+    std::vector<const atom *> temp_atoms;
     for (std::vector<int>::iterator iter = IdxOfAtom.begin(); iter != IdxOfAtom.end(); ++iter) {
       temp = World::getInstance().getAtom(AtomById(*iter));
       if (temp)
-        tmp.push_back(temp);
+        temp_atoms.push_back(temp);
     }
+    tmp.set(temp_atoms);
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/BooleanCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/BooleanCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/BooleanCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -25,6 +25,6 @@
 #include "CodePatterns/Verbose.hpp"
 
-CommandLineDialog::BooleanCommandLineQuery::BooleanCommandLineQuery(std::string title, std::string _description) :
-    Dialog::BooleanQuery(title, _description)
+CommandLineDialog::BooleanCommandLineQuery::BooleanCommandLineQuery(Parameter<bool> &param, std::string title, std::string _description) :
+    Dialog::BooleanQuery(param, title, _description)
 {}
 
@@ -33,5 +33,5 @@
 bool CommandLineDialog::BooleanCommandLineQuery::handle() {
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    tmp = CommandLineParser::getInstance().vm[getTitle()].as<bool>();
+    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<bool>());
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/BoxCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/BoxCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/*
- * Project: MoleCuilder
- * Description: creates and alters molecular systems
- * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
- * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
- */
-
-/*
- * BoxCommandLineQuery.cpp
- *
- *  Created on: Oct 25, 2010
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "Actions/Values.hpp"
-#include "CommandLineUI/Query/CommandLineQuery.hpp"
-#include "CommandLineUI/CommandLineParser.hpp"
-#include "CodePatterns/Log.hpp"
-#include "CodePatterns/Verbose.hpp"
-#include "LinearAlgebra/RealSpaceMatrix.hpp"
-
-CommandLineDialog::BoxCommandLineQuery::BoxCommandLineQuery(std::string title, std::string _description) :
-    Dialog::BoxQuery(title, _description)
-{}
-
-CommandLineDialog::BoxCommandLineQuery::~BoxCommandLineQuery()
-{}
-
-bool CommandLineDialog::BoxCommandLineQuery::handle() {
-  BoxValue temp;
-  if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    temp = CommandLineParser::getInstance().vm[getTitle()].as< BoxValue >();
-    tmp = temp.toBox();
-    return true;
-  } else {
-    ELOG(1, "CommandLineUI parsing error: Missing symmetric box matrix for " << getTitle() << ".");
-    return false;
-  }
-}
-
Index: src/UIElements/CommandLineUI/Query/CommandLineQuery.hpp
===================================================================
--- src/UIElements/CommandLineUI/Query/CommandLineQuery.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/CommandLineQuery.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -26,5 +26,5 @@
 class CommandLineDialog::IntCommandLineQuery : public Dialog::IntQuery {
 public:
-  IntCommandLineQuery(std::string title, std::string _description = "");
+  IntCommandLineQuery(Parameter<int> &param, std::string title, std::string _description = "");
   virtual ~IntCommandLineQuery();
   virtual bool handle();
@@ -33,5 +33,5 @@
 class CommandLineDialog::IntsCommandLineQuery : public Dialog::IntsQuery {
 public:
-  IntsCommandLineQuery(std::string title, std::string _description = "");
+  IntsCommandLineQuery(Parameter<std::vector<int> > &param, std::string title, std::string _description = "");
   virtual ~IntsCommandLineQuery();
   virtual bool handle();
@@ -40,5 +40,5 @@
 class CommandLineDialog::UnsignedIntCommandLineQuery : public Dialog::UnsignedIntQuery {
 public:
-  UnsignedIntCommandLineQuery(std::string title, std::string _description = "");
+  UnsignedIntCommandLineQuery(Parameter<unsigned int> &param, std::string title, std::string _description = "");
   virtual ~UnsignedIntCommandLineQuery();
   virtual bool handle();
@@ -47,5 +47,5 @@
 class CommandLineDialog::UnsignedIntsCommandLineQuery : public Dialog::UnsignedIntsQuery {
 public:
-  UnsignedIntsCommandLineQuery(std::string title, std::string _description = "");
+  UnsignedIntsCommandLineQuery(Parameter<std::vector<unsigned int> > &param, std::string title, std::string _description = "");
   virtual ~UnsignedIntsCommandLineQuery();
   virtual bool handle();
@@ -54,5 +54,5 @@
 class CommandLineDialog::BooleanCommandLineQuery : public Dialog::BooleanQuery {
 public:
-  BooleanCommandLineQuery(std::string title, std::string _description = "");
+  BooleanCommandLineQuery(Parameter<bool> &param, std::string title, std::string _description = "");
   virtual ~BooleanCommandLineQuery();
   virtual bool handle();
@@ -61,5 +61,5 @@
 class CommandLineDialog::DoubleCommandLineQuery : public Dialog::DoubleQuery {
 public:
-  DoubleCommandLineQuery(std::string title, std::string _description = "");
+  DoubleCommandLineQuery(Parameter<double> &param, std::string title, std::string _description = "");
   virtual ~DoubleCommandLineQuery();
   virtual bool handle();
@@ -68,5 +68,5 @@
 class CommandLineDialog::DoublesCommandLineQuery : public Dialog::DoublesQuery {
 public:
-  DoublesCommandLineQuery(std::string title, std::string _description = "");
+  DoublesCommandLineQuery(Parameter<std::vector<double> > &param, std::string title, std::string _description = "");
   virtual ~DoublesCommandLineQuery();
   virtual bool handle();
@@ -75,5 +75,5 @@
 class CommandLineDialog::StringCommandLineQuery : public Dialog::StringQuery {
 public:
-  StringCommandLineQuery(std::string title, std::string _description = "");
+  StringCommandLineQuery(Parameter<std::string> &param, std::string title, std::string _description = "");
   virtual ~StringCommandLineQuery();
   virtual bool handle();
@@ -82,5 +82,5 @@
 class CommandLineDialog::StringsCommandLineQuery : public Dialog::StringsQuery {
 public:
-  StringsCommandLineQuery(std::string title, std::string _description = "");
+  StringsCommandLineQuery(Parameter<std::vector<std::string> > &param, std::string title, std::string _description = "");
   virtual ~StringsCommandLineQuery();
   virtual bool handle();
@@ -89,5 +89,5 @@
 class CommandLineDialog::AtomCommandLineQuery : public Dialog::AtomQuery {
 public:
-  AtomCommandLineQuery(std::string title, std::string _description = "");
+  AtomCommandLineQuery(Parameter<const atom *> &param, std::string title, std::string _description = "");
   virtual ~AtomCommandLineQuery();
   virtual bool handle();
@@ -96,5 +96,5 @@
 class CommandLineDialog::AtomsCommandLineQuery : public Dialog::AtomsQuery {
 public:
-  AtomsCommandLineQuery(std::string title, std::string _description = "");
+  AtomsCommandLineQuery(Parameter<std::vector<const atom *> > &param, std::string title, std::string _description = "");
   virtual ~AtomsCommandLineQuery();
   virtual bool handle();
@@ -103,5 +103,5 @@
 class CommandLineDialog::MoleculeCommandLineQuery : public Dialog::MoleculeQuery {
 public:
-  MoleculeCommandLineQuery(std::string title, std::string _description = "");
+  MoleculeCommandLineQuery(Parameter<const molecule *> &param, std::string title, std::string _description = "");
   virtual ~MoleculeCommandLineQuery();
   virtual bool handle();
@@ -110,5 +110,5 @@
 class CommandLineDialog::MoleculesCommandLineQuery : public Dialog::MoleculesQuery {
 public:
-  MoleculesCommandLineQuery(std::string title, std::string _description = "");
+  MoleculesCommandLineQuery(Parameter<std::vector<const molecule *> > &param, std::string title, std::string _description = "");
   virtual ~MoleculesCommandLineQuery();
   virtual bool handle();
@@ -117,5 +117,5 @@
 class CommandLineDialog::VectorCommandLineQuery : public Dialog::VectorQuery {
 public:
-  VectorCommandLineQuery(std::string title,bool _check, std::string _description = "");
+  VectorCommandLineQuery(Parameter<Vector> &param, std::string title,bool _check, std::string _description = "");
   virtual ~VectorCommandLineQuery();
   virtual bool handle();
@@ -124,13 +124,13 @@
 class CommandLineDialog::VectorsCommandLineQuery : public Dialog::VectorsQuery {
 public:
-  VectorsCommandLineQuery(std::string title,bool _check, std::string _description = "");
+  VectorsCommandLineQuery(Parameter<std::vector<Vector> > &param, std::string title,bool _check, std::string _description = "");
   virtual ~VectorsCommandLineQuery();
   virtual bool handle();
 };
 
-class CommandLineDialog::BoxCommandLineQuery : public Dialog::BoxQuery {
+class CommandLineDialog::RealSpaceMatrixCommandLineQuery : public Dialog::RealSpaceMatrixQuery {
 public:
-  BoxCommandLineQuery(std::string title, std::string _description = "");
-  virtual ~BoxCommandLineQuery();
+  RealSpaceMatrixCommandLineQuery(Parameter<RealSpaceMatrix> &param, std::string title, std::string _description = "");
+  virtual ~RealSpaceMatrixCommandLineQuery();
   virtual bool handle();
 };
@@ -138,5 +138,5 @@
 class CommandLineDialog::ElementCommandLineQuery : public Dialog::ElementQuery {
 public:
-  ElementCommandLineQuery(std::string title, std::string _description = "");
+  ElementCommandLineQuery(Parameter<const element *> &param, std::string title, std::string _description = "");
   virtual ~ElementCommandLineQuery();
   virtual bool handle();
@@ -145,5 +145,5 @@
 class CommandLineDialog::ElementsCommandLineQuery : public Dialog::ElementsQuery {
 public:
-  ElementsCommandLineQuery(std::string title, std::string _description = "");
+  ElementsCommandLineQuery(Parameter<std::vector<const element *> > &param, std::string title, std::string _description = "");
   virtual ~ElementsCommandLineQuery();
   virtual bool handle();
@@ -152,5 +152,5 @@
 class CommandLineDialog::FileCommandLineQuery : public Dialog::FileQuery {
 public:
-  FileCommandLineQuery(std::string title, std::string _description = "");
+  FileCommandLineQuery(Parameter<boost::filesystem::path> &param, std::string title, std::string _description = "");
   virtual ~FileCommandLineQuery();
   virtual bool handle();
@@ -159,5 +159,5 @@
 class CommandLineDialog::FilesCommandLineQuery : public Dialog::FilesQuery {
 public:
-  FilesCommandLineQuery(std::string title, std::string _description = "");
+  FilesCommandLineQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string title, std::string _description = "");
   virtual ~FilesCommandLineQuery();
   virtual bool handle();
@@ -166,5 +166,5 @@
 class CommandLineDialog::RandomNumberDistribution_ParametersCommandLineQuery : public Dialog::RandomNumberDistribution_ParametersQuery {
 public:
-  RandomNumberDistribution_ParametersCommandLineQuery(std::string title, std::string _description = "");
+  RandomNumberDistribution_ParametersCommandLineQuery(Parameter<RandomNumberDistribution_Parameters> &param, std::string title, std::string _description = "");
   virtual ~RandomNumberDistribution_ParametersCommandLineQuery();
   virtual bool handle();
Index: src/UIElements/CommandLineUI/Query/DoubleCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/DoubleCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/DoubleCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -26,6 +26,6 @@
 
 
-CommandLineDialog::DoubleCommandLineQuery::DoubleCommandLineQuery(std::string title, std::string _description) :
-    Dialog::DoubleQuery(title, _description)
+CommandLineDialog::DoubleCommandLineQuery::DoubleCommandLineQuery(Parameter<double> &param, std::string title, std::string _description) :
+    Dialog::DoubleQuery(param, title, _description)
 {}
 
@@ -34,5 +34,5 @@
 bool CommandLineDialog::DoubleCommandLineQuery::handle() {
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    tmp = CommandLineParser::getInstance().vm[getTitle()].as<double>();
+    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<double>());
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/DoublesCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/DoublesCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/DoublesCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -25,6 +25,6 @@
 #include "CodePatterns/Verbose.hpp"
 
-CommandLineDialog::DoublesCommandLineQuery::DoublesCommandLineQuery(std::string title, std::string _description) :
-    Dialog::DoublesQuery(title, _description)
+CommandLineDialog::DoublesCommandLineQuery::DoublesCommandLineQuery(Parameter<std::vector<double> > &param, std::string title, std::string _description) :
+    Dialog::DoublesQuery(param, title, _description)
 {}
 
@@ -33,5 +33,5 @@
 bool CommandLineDialog::DoublesCommandLineQuery::handle() {
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    tmp = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<double> >();
+    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< std::vector<double> >());
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/ElementCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/ElementCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/ElementCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,6 +28,6 @@
 #include "World.hpp"
 
-CommandLineDialog::ElementCommandLineQuery::ElementCommandLineQuery(std::string title, std::string _description) :
-    Dialog::ElementQuery(title, _description)
+CommandLineDialog::ElementCommandLineQuery::ElementCommandLineQuery(Parameter<const element*> &param, std::string title, std::string _description) :
+    Dialog::ElementQuery(param, title, _description)
 {}
 
@@ -40,6 +40,6 @@
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
     int Z = CommandLineParser::getInstance().vm[getTitle()].as< int >();
-    tmp = periode->FindElement(Z);
-    ASSERT(tmp != NULL, "Invalid element specified in ElementCommandLineQuery");
+    tmp.set(periode->FindElement(Z));
+    ASSERT(tmp.get() != NULL, "Invalid element specified in ElementCommandLineQuery");
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/ElementsCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/ElementsCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/ElementsCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,6 +28,6 @@
 #include "World.hpp"
 
-CommandLineDialog::ElementsCommandLineQuery::ElementsCommandLineQuery(std::string title, std::string _description) :
-    Dialog::ElementsQuery(title, _description)
+CommandLineDialog::ElementsCommandLineQuery::ElementsCommandLineQuery(Parameter<std::vector<const element*> > &param, std::string title, std::string _description) :
+    Dialog::ElementsQuery(param, title, _description)
 {}
 
@@ -40,9 +40,11 @@
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
     vector<int> AllElements = CommandLineParser::getInstance().vm[getTitle()].as< vector<int> >();
+    vector<const element *> temp_elements;
     for (vector<int>::iterator ZRunner = AllElements.begin(); ZRunner != AllElements.end(); ++ZRunner) {
       temp = periode->FindElement(*ZRunner);
       ASSERT(temp != NULL, "Invalid element specified in ElementCommandLineQuery");
-      tmp.push_back(temp);
+      temp_elements.push_back(temp);
     }
+    tmp.set(temp_elements);
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/FileCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/FileCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/FileCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -25,6 +25,6 @@
 #include "CodePatterns/Verbose.hpp"
 
-CommandLineDialog::FileCommandLineQuery::FileCommandLineQuery(std::string title, std::string _description) :
-    Dialog::FileQuery(title, _description)
+CommandLineDialog::FileCommandLineQuery::FileCommandLineQuery(Parameter<boost::filesystem::path> &param, std::string title, std::string _description) :
+    Dialog::FileQuery(param, title, _description)
 {}
 
@@ -33,5 +33,5 @@
 bool CommandLineDialog::FileCommandLineQuery::handle() {
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    tmp = CommandLineParser::getInstance().vm[getTitle()].as< boost::filesystem::path >();
+    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< boost::filesystem::path >());
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/FilesCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/FilesCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/FilesCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -25,6 +25,6 @@
 #include "CodePatterns/Verbose.hpp"
 
-CommandLineDialog::FilesCommandLineQuery::FilesCommandLineQuery(std::string title, std::string _description) :
-    Dialog::FilesQuery(title, _description)
+CommandLineDialog::FilesCommandLineQuery::FilesCommandLineQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string title, std::string _description) :
+    Dialog::FilesQuery(param, title, _description)
 {}
 
@@ -33,5 +33,5 @@
 bool CommandLineDialog::FilesCommandLineQuery::handle() {
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    tmp = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<boost::filesystem::path> >();
+    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< std::vector<boost::filesystem::path> >());
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/IntCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/IntCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/IntCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -25,6 +25,6 @@
 #include "CodePatterns/Verbose.hpp"
 
-CommandLineDialog::IntCommandLineQuery::IntCommandLineQuery(std::string title, std::string _description) :
-    Dialog::IntQuery(title, _description)
+CommandLineDialog::IntCommandLineQuery::IntCommandLineQuery(Parameter<int> &param, std::string title, std::string _description) :
+    Dialog::IntQuery(param, title, _description)
 {}
 
@@ -33,5 +33,5 @@
 bool CommandLineDialog::IntCommandLineQuery::handle() {
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    tmp = CommandLineParser::getInstance().vm[getTitle()].as<int>();
+    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<int>());
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/IntsCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/IntsCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/IntsCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -25,6 +25,6 @@
 #include "CodePatterns/Verbose.hpp"
 
-CommandLineDialog::IntsCommandLineQuery::IntsCommandLineQuery(std::string title, std::string _description) :
-    Dialog::IntsQuery(title, _description)
+CommandLineDialog::IntsCommandLineQuery::IntsCommandLineQuery(Parameter<std::vector<int> > &param, std::string title, std::string _description) :
+    Dialog::IntsQuery(param, title, _description)
 {}
 
@@ -33,5 +33,5 @@
 bool CommandLineDialog::IntsCommandLineQuery::handle() {
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    tmp = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >();
+    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >());
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/MoleculeCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/MoleculeCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/MoleculeCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,6 +28,6 @@
 #include "CodePatterns/Verbose.hpp"
 
-CommandLineDialog::MoleculeCommandLineQuery::MoleculeCommandLineQuery(std::string title, std::string _description) :
-    Dialog::MoleculeQuery(title, _description)
+CommandLineDialog::MoleculeCommandLineQuery::MoleculeCommandLineQuery(Parameter<const molecule *> &param, std::string title, std::string _description) :
+    Dialog::MoleculeQuery(param, title, _description)
 {}
 
@@ -38,5 +38,5 @@
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
     IdxOfMol = CommandLineParser::getInstance().vm[getTitle()].as<int>();
-    tmp = World::getInstance().getMolecule(MoleculeById(IdxOfMol));
+    tmp.set(World::getInstance().getMolecule(MoleculeById(IdxOfMol)));
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/MoleculesCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/MoleculesCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/MoleculesCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -29,6 +29,6 @@
 #include "World.hpp"
 
-CommandLineDialog::MoleculesCommandLineQuery::MoleculesCommandLineQuery(std::string title, std::string _description) :
-    Dialog::MoleculesQuery(title, _description)
+CommandLineDialog::MoleculesCommandLineQuery::MoleculesCommandLineQuery(Parameter<std::vector<const molecule *> > &param, std::string title, std::string _description) :
+    Dialog::MoleculesQuery(param, title, _description)
 {}
 
@@ -39,9 +39,11 @@
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
     IdxOfMol = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >();
+    std::vector<const molecule *> temp_molecules;
     for (std::vector<int>::iterator iter = IdxOfMol.begin(); iter != IdxOfMol.end(); ++iter) {
       temp = World::getInstance().getMolecule(MoleculeById(*iter));
       if (temp)
-        tmp.push_back(temp);
+        temp_molecules.push_back(temp);
     }
+    tmp.set(temp_molecules);
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/RandomNumberDistribution_ParametersCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/RandomNumberDistribution_ParametersCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/RandomNumberDistribution_ParametersCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 #include "RandomNumbers/RandomNumberDistribution_Parameters.hpp"
 
-CommandLineDialog::RandomNumberDistribution_ParametersCommandLineQuery::RandomNumberDistribution_ParametersCommandLineQuery(std::string title, std::string _description) :
-    Dialog::RandomNumberDistribution_ParametersQuery(title, _description)
+CommandLineDialog::RandomNumberDistribution_ParametersCommandLineQuery::RandomNumberDistribution_ParametersCommandLineQuery(Parameter<RandomNumberDistribution_Parameters> &param, std::string title, std::string _description) :
+    Dialog::RandomNumberDistribution_ParametersQuery(param, title, _description)
 {}
 
@@ -42,5 +42,7 @@
     std::stringstream text(stringtext);
 //    LOG(1, "INFO: Parameter set from CommandLine is '" << text.str() << "'");
-    text >> tmp;
+    RandomNumberDistribution_Parameters temp_params;
+    text >> temp_params;
+    tmp.set(temp_params);
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/RealSpaceMatrixCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/RealSpaceMatrixCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
+++ src/UIElements/CommandLineUI/Query/RealSpaceMatrixCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -0,0 +1,47 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * BoxCommandLineQuery.cpp
+ *
+ *  Created on: Oct 25, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "Actions/Values.hpp"
+#include "CommandLineUI/Query/CommandLineQuery.hpp"
+#include "CommandLineUI/CommandLineParser.hpp"
+#include "CodePatterns/Log.hpp"
+#include "CodePatterns/Verbose.hpp"
+#include "LinearAlgebra/RealSpaceMatrix.hpp"
+
+CommandLineDialog::RealSpaceMatrixCommandLineQuery::RealSpaceMatrixCommandLineQuery(Parameter<RealSpaceMatrix> &param, std::string title, std::string _description) :
+    Dialog::RealSpaceMatrixQuery(param, title, _description)
+{}
+
+CommandLineDialog::RealSpaceMatrixCommandLineQuery::~RealSpaceMatrixCommandLineQuery()
+{}
+
+bool CommandLineDialog::RealSpaceMatrixCommandLineQuery::handle() {
+  RealSpaceMatrixValue temp;
+  if (CommandLineParser::getInstance().vm.count(getTitle())) {
+    temp = CommandLineParser::getInstance().vm[getTitle()].as< RealSpaceMatrixValue >();
+    tmp.set(temp.toRealSpaceMatrix());
+    return true;
+  } else {
+    ELOG(1, "CommandLineUI parsing error: Missing symmetric box matrix for " << getTitle() << ".");
+    return false;
+  }
+}
+
Index: src/UIElements/CommandLineUI/Query/StringCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/StringCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/StringCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -25,6 +25,6 @@
 #include "CodePatterns/Verbose.hpp"
 
-CommandLineDialog::StringCommandLineQuery::StringCommandLineQuery(std::string title, std::string _description) :
-    Dialog::StringQuery(title, _description)
+CommandLineDialog::StringCommandLineQuery::StringCommandLineQuery(Parameter<std::string> &param, std::string title, std::string _description) :
+    Dialog::StringQuery(param, title, _description)
 {}
 
@@ -33,5 +33,5 @@
 bool CommandLineDialog::StringCommandLineQuery::handle() {
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    tmp = CommandLineParser::getInstance().vm[getTitle()].as<string>();
+    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<string>());
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/StringsCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/StringsCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/StringsCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -25,6 +25,6 @@
 #include "CodePatterns/Verbose.hpp"
 
-CommandLineDialog::StringsCommandLineQuery::StringsCommandLineQuery(std::string title, std::string _description) :
-    Dialog::StringsQuery(title, _description)
+CommandLineDialog::StringsCommandLineQuery::StringsCommandLineQuery(Parameter<std::vector<std::string> > &param, std::string title, std::string _description) :
+    Dialog::StringsQuery(param, title, _description)
 {}
 
@@ -33,5 +33,5 @@
 bool CommandLineDialog::StringsCommandLineQuery::handle() {
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    tmp = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<std::string> >();
+    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< std::vector<std::string> >());
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/UnsignedIntCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/UnsignedIntCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/UnsignedIntCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -25,6 +25,6 @@
 #include "CodePatterns/Verbose.hpp"
 
-CommandLineDialog::UnsignedIntCommandLineQuery::UnsignedIntCommandLineQuery(std::string title, std::string _description) :
-    Dialog::UnsignedIntQuery(title, _description)
+CommandLineDialog::UnsignedIntCommandLineQuery::UnsignedIntCommandLineQuery(Parameter<unsigned int> &param, std::string title, std::string _description) :
+    Dialog::UnsignedIntQuery(param, title, _description)
 {}
 
@@ -33,5 +33,5 @@
 bool CommandLineDialog::UnsignedIntCommandLineQuery::handle() {
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    tmp = CommandLineParser::getInstance().vm[getTitle()].as<unsigned int>();
+    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as<unsigned int>());
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/UnsignedIntsCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/UnsignedIntsCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/UnsignedIntsCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -25,6 +25,6 @@
 #include "CodePatterns/Verbose.hpp"
 
-CommandLineDialog::UnsignedIntsCommandLineQuery::UnsignedIntsCommandLineQuery(std::string title, std::string _description) :
-    Dialog::UnsignedIntsQuery(title, _description)
+CommandLineDialog::UnsignedIntsCommandLineQuery::UnsignedIntsCommandLineQuery(Parameter<std::vector<unsigned int> > &param, std::string title, std::string _description) :
+    Dialog::UnsignedIntsQuery(param, title, _description)
 {}
 
@@ -33,5 +33,5 @@
 bool CommandLineDialog::UnsignedIntsCommandLineQuery::handle() {
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
-    tmp = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<unsigned int> >();
+    tmp.set(CommandLineParser::getInstance().vm[getTitle()].as< std::vector<unsigned int> >());
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/VectorCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/VectorCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/VectorCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -29,6 +29,6 @@
 #include "World.hpp"
 
-CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery(std::string title, bool _check, std::string _description) :
-    Dialog::VectorQuery(title,_check, _description)
+CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery(Parameter<Vector> &param, std::string title, bool _check, std::string _description) :
+    Dialog::VectorQuery(param, title,_check, _description)
 {}
 
@@ -40,9 +40,10 @@
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
     temp = CommandLineParser::getInstance().vm[getTitle()].as< VectorValue >();
-    tmp = temp.toVector();
-    if ((check) && (!World::getInstance().getDomain().isValid(tmp))) {
-      ELOG(1, "Vector " << tmp << " would be outside of box domain.");
+    Vector temp_vector = temp.toVector();
+    if ((check) && (!World::getInstance().getDomain().isValid(temp_vector))) {
+      ELOG(1, "Vector " << temp_vector << " would be outside of box domain.");
       return false;
     }
+    tmp.set(temp_vector);
     return true;
   } else {
Index: src/UIElements/CommandLineUI/Query/VectorsCommandLineQuery.cpp
===================================================================
--- src/UIElements/CommandLineUI/Query/VectorsCommandLineQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/Query/VectorsCommandLineQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -29,6 +29,6 @@
 #include "World.hpp"
 
-CommandLineDialog::VectorsCommandLineQuery::VectorsCommandLineQuery(std::string title, bool _check, std::string _description) :
-    Dialog::VectorsQuery(title,_check, _description)
+CommandLineDialog::VectorsCommandLineQuery::VectorsCommandLineQuery(Parameter<std::vector<Vector> > &param, std::string title, bool _check, std::string _description) :
+    Dialog::VectorsQuery(param, title,_check, _description)
 {}
 
@@ -40,11 +40,13 @@
   if (CommandLineParser::getInstance().vm.count(getTitle())) {
     temporary = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<VectorValue> >();
+    std::vector<Vector> temp_vectors;
     for(std::vector<VectorValue>::iterator iter = temporary.begin(); iter != temporary.end(); ++iter) {
       temp = (*iter).toVector();
       if ((!check) || (World::getInstance().getDomain().isValid(temp)))
-        tmp.push_back(temp);
+        temp_vectors.push_back(temp);
       else
         ELOG(1, "Vector " << temp << " would be outside of box domain.");
     }
+    tmp.set(temp_vectors);
     return true;
   } else {
Index: src/UIElements/CommandLineUI/TypeEnumContainer.cpp
===================================================================
--- src/UIElements/CommandLineUI/TypeEnumContainer.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/TypeEnumContainer.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 
 #include "Atom/atom.hpp"
-#include "Box.hpp"
 #include "LinearAlgebra/BoxVector.hpp"
+#include "LinearAlgebra/RealSpaceMatrix.hpp"
 #include "LinearAlgebra/Vector.hpp"
 #include "Element/element.hpp"
@@ -45,5 +45,5 @@
   TypeEnumMap[&typeid(void)] = NoneType;
   TypeEnumMap[&typeid(bool)] = BooleanType;
-  TypeEnumMap[&typeid(Box)] = BoxType;
+  TypeEnumMap[&typeid(RealSpaceMatrix)] = RealSpaceMatrixType;
   TypeEnumMap[&typeid(BoxVector)] = VectorType;
   TypeEnumMap[&typeid(Vector)] = VectorType;
Index: src/UIElements/CommandLineUI/TypeEnumContainer.hpp
===================================================================
--- src/UIElements/CommandLineUI/TypeEnumContainer.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/TypeEnumContainer.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,5 +28,4 @@
   enum EnumOfTypes { NoneType,
         BooleanType,
-        BoxType,
         FileType,
         ListOfFilesType,
@@ -47,5 +46,6 @@
         ElementType,
         ListOfElementsType,
-        RandomNumberDistribution_ParametersType
+        RandomNumberDistribution_ParametersType,
+        RealSpaceMatrixType
   };
 
Index: src/UIElements/CommandLineUI/unittests/CommandLineParser_ActionRegistry_ConsistencyUnitTest.cpp
===================================================================
--- src/UIElements/CommandLineUI/unittests/CommandLineParser_ActionRegistry_ConsistencyUnitTest.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/CommandLineUI/unittests/CommandLineParser_ActionRegistry_ConsistencyUnitTest.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,4 +28,6 @@
 #include "Actions/ActionTrait.hpp"
 #include "UIElements/CommandLineUI/CommandLineParser.hpp"
+#include "World.hpp"
+#include "WorldTime.hpp"
 
 #include "CommandLineParser_ActionRegistry_ConsistencyUnitTest.hpp"
@@ -45,5 +47,5 @@
 void CommandLineParser_ActionRegistry_ConsistencyTest::setUp()
 {
-  AR = ActionRegistry::getPointer();
+  CPPUNIT_ASSERT_NO_THROW(AR = ActionRegistry::getPointer());
   CLP = CommandLineParser::getPointer();
 };
@@ -54,4 +56,9 @@
   CommandLineParser::purgeInstance();
   ActionRegistry::purgeInstance();
+  // these come about because of the validators accessing them instantiated
+  // by ActionRegistry. In ActionRegistryUnitTest we used stubs for them but
+  // here we care whether default values are actually valid.
+  World::purgeInstance();
+  WorldTime::purgeInstance();
 };
 
Index: src/UIElements/Dialog.cpp
===================================================================
--- src/UIElements/Dialog.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Dialog.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -26,6 +26,7 @@
 #include "CodePatterns/Verbose.hpp"
 
+#include "Parameters/ParameterExceptions.hpp"
+
 class Atom;
-class Box;
 class element;
 class RealSpaceMatrix;
@@ -65,5 +66,12 @@
   bool retval = true;
   for(iter=queries.begin(); iter!=queries.end(); iter++){
-    retval &= (*iter)->handle();
+    try {
+      retval &= (*iter)->handle();
+    } catch (ParameterException &e) {
+      if( const std::string *name=boost::get_error_info<ParameterName>(e) )
+        ELOG(1, "The following parameter value is not valid: " << *name << ".");
+      retval = false;
+      break;
+    }
     // if any query fails (is canceled), we can end the handling process
     if(!retval) {
@@ -78,5 +86,11 @@
   list<Query*>::iterator iter;
   for(iter=queries.begin(); iter!=queries.end(); iter++) {
-    (*iter)->setResult();
+    try {
+      (*iter)->setResult();
+    } catch (ParameterException &e) {
+      if( const std::string *name=boost::get_error_info<ParameterName>(e) )
+        ELOG(1, "The following parameter value is not valid: " << *name << ".");
+      break;
+    }
   }
 }
@@ -86,122 +100,124 @@
 }
 
-template <> void Dialog::query<void *>(const char *token, std::string description)
+template <> void Dialog::query<void *>(Parameter<void *> &param, const char *token, std::string description)
 {
   queryEmpty(token, description);
 }
 
-template <> void Dialog::query<bool>(const char *token, std::string description)
-{
-  queryBoolean(token, description);
-}
-
-template <> void Dialog::query<int>(const char *token, std::string description)
-{
-  queryInt(token, description);
-}
-
-template <> void Dialog::query< std::vector<int> >(const char *token, std::string description)
-{
-  queryInts(token, description);
-}
-
-template <> void Dialog::query<unsigned int>(const char *token, std::string description)
-{
-  queryUnsignedInt(token, description);
-}
-
-template <> void Dialog::query< std::vector<unsigned int> >(const char *token, std::string description)
-{
-  queryUnsignedInts(token, description);
-}
-
-template <> void Dialog::query<double>(const char *token, std::string description)
-{
-  queryDouble(token, description);
-}
-
-template <> void Dialog::query< std::vector<double> >(const char *token, std::string description)
-{
-  queryDoubles(token, description);
-}
-
-template <> void Dialog::query<std::string>(const char *token, std::string description)
-{
-  queryString(token, description);
-}
-
-template <> void Dialog::query< std::vector<std::string> >(const char *token, std::string description)
-{
-  queryStrings(token, description);
-}
-
-template <> void Dialog::query<const atom *>(const char *token, std::string description)
-{
-  queryAtom(token, description);
-}
-
-template <> void Dialog::query< std::vector<const atom *> >(const char *token, std::string description)
-{
-  queryAtoms(token, description);
-}
-
-template <> void Dialog::query<const molecule *>(const char *token, std::string description)
-{
-  queryMolecule(token, description);
-}
-
-template <> void Dialog::query< std::vector<const molecule *> >(const char *token, std::string description)
-{
-  queryMolecules(token, description);
-}
-
-template <> void Dialog::query<Vector>(const char *token, std::string description)
-{
-  queryVector(token, false, description);
-}
-
-template <> void Dialog::query< std::vector<Vector> >(const char *token, std::string description)
-{
-  queryVectors(token, false, description);
-}
-
-template <> void Dialog::query<BoxVector>(const char *token, std::string description)
-{
-  queryVector(token, true, description);
-}
-
-template <> void Dialog::query< std::vector<BoxVector> >(const char *token, std::string description)
-{
-  queryVectors(token, true, description);
-}
-
-template <> void Dialog::query<Box>(const char *token, std::string description)
-{
-  queryBox(token, description);
-}
-
-template <> void Dialog::query<const element *>(const char *token, std::string description)
-{
-  queryElement(token, description);
-}
-
-template <> void Dialog::query< std::vector<const element *> >(const char *token, std::string description)
-{
-  queryElements(token, description);
-}
-
-template <> void Dialog::query< boost::filesystem::path >(const char *token, std::string description)
-{
-  queryFile(token, description);
-}
-
-template <> void Dialog::query< std::vector<boost::filesystem::path> >(const char *token, std::string description)
-{
-  queryFiles(token, description);
-}
-
-template <> void Dialog::query< RandomNumberDistribution_Parameters >(const char *token, std::string description)
-{
-  queryRandomNumberDistribution_Parameters(token, description);
+template <> void Dialog::query<bool>(Parameter<bool> &param, const char *token, std::string description)
+{
+  queryBoolean(param, token, description);
+}
+
+template <> void Dialog::query<int>(Parameter<int> &param, const char *token, std::string description)
+{
+  queryInt(param, token, description);
+}
+
+template <> void Dialog::query< std::vector<int> >(Parameter<std::vector<int> > &param, const char *token, std::string description)
+{
+  queryInts(param, token, description);
+}
+
+template <> void Dialog::query<unsigned int>(Parameter<unsigned int> &param, const char *token, std::string description)
+{
+  queryUnsignedInt(param, token, description);
+}
+
+template <> void Dialog::query< std::vector<unsigned int> >(Parameter<std::vector<unsigned int> > &param, const char *token, std::string description)
+{
+  queryUnsignedInts(param, token, description);
+}
+
+template <> void Dialog::query<double>(Parameter<double> &param, const char *token, std::string description)
+{
+  queryDouble(param, token, description);
+}
+
+template <> void Dialog::query< std::vector<double> >(Parameter<std::vector<double> > &param, const char *token, std::string description)
+{
+  queryDoubles(param, token, description);
+}
+
+template <> void Dialog::query<std::string>(Parameter<std::string> &param, const char *token, std::string description)
+{
+  queryString(param, token, description);
+}
+
+template <> void Dialog::query< std::vector<std::string> >(Parameter<std::vector<std::string> > &param, const char *token, std::string description)
+{
+  queryStrings(param, token, description);
+}
+
+template <> void Dialog::query<const atom *>(Parameter<const atom *> &param, const char *token, std::string description)
+{
+  queryAtom(param, token, description);
+}
+
+template <> void Dialog::query< std::vector<const atom *> >(Parameter<std::vector<const atom *> > &param, const char *token, std::string description)
+{
+  queryAtoms(param, token, description);
+}
+
+template <> void Dialog::query<const molecule *>(Parameter<const molecule *> &param, const char *token, std::string description)
+{
+  queryMolecule(param, token, description);
+}
+
+template <> void Dialog::query< std::vector<const molecule *> >(Parameter<std::vector<const molecule *> > &param, const char *token, std::string description)
+{
+  queryMolecules(param, token, description);
+}
+
+template <> void Dialog::query<Vector>(Parameter<Vector> &param, const char *token, std::string description)
+{
+  queryVector(param, token, false, description);
+}
+
+template <> void Dialog::query< std::vector<Vector> >(Parameter<std::vector<Vector> > &param, const char *token, std::string description)
+{
+  queryVectors(param, token, false, description);
+}
+
+template <> void Dialog::query<BoxVector>(Parameter<BoxVector> &param, const char *token, std::string description)
+{
+  ASSERT(0, "TODO: query<BoxVector>");
+  //queryVector(param, token, true, description);
+}
+
+template <> void Dialog::query< std::vector<BoxVector> >(Parameter<std::vector<BoxVector> > &param, const char *token, std::string description)
+{
+  ASSERT(0, "TODO: query<vector<BoxVector> >");
+  //queryVectors(param, token, true, description);
+}
+
+template <> void Dialog::query<RealSpaceMatrix>(Parameter<RealSpaceMatrix> &param, const char *token, std::string description)
+{
+  queryRealSpaceMatrix(param, token, description);
+}
+
+template <> void Dialog::query<const element *>(Parameter<const element *> &param, const char *token, std::string description)
+{
+  queryElement(param, token, description);
+}
+
+template <> void Dialog::query< std::vector<const element *> >(Parameter<std::vector<const element *> > &param, const char *token, std::string description)
+{
+  queryElements(param, token, description);
+}
+
+template <> void Dialog::query< boost::filesystem::path >(Parameter<boost::filesystem::path> &param, const char *token, std::string description)
+{
+  queryFile(param, token, description);
+}
+
+template <> void Dialog::query< std::vector<boost::filesystem::path> >(Parameter<std::vector< boost::filesystem::path> > &param, const char *token, std::string description)
+{
+  queryFiles(param, token, description);
+}
+
+template <> void Dialog::query< RandomNumberDistribution_Parameters >(Parameter<RandomNumberDistribution_Parameters> &param, const char *token, std::string description)
+{
+  queryRandomNumberDistribution_Parameters(param, token, description);
 }
 
Index: src/UIElements/Dialog.hpp
===================================================================
--- src/UIElements/Dialog.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Dialog.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -20,10 +20,11 @@
 
 #include <boost/filesystem.hpp>
-#include "Box.hpp"
+#include "LinearAlgebra/RealSpaceMatrix.hpp"
 #include "LinearAlgebra/Vector.hpp"
 #include "RandomNumbers/RandomNumberDistribution_Parameters.hpp"
+#include "Parameters/Parameter.hpp"
 
 class atom;
-class Box;
+class RealSpaceMatrix;
 class element;
 class molecule;
@@ -155,28 +156,28 @@
   virtual ~Dialog();
 
-  template <class T> void query(const char *, std::string = "");
+  template <class T> void query(Parameter<T> &, const char *, std::string = "");
 
   virtual void queryEmpty(const char *, std::string = "")=0;
-  virtual void queryBoolean(const char *, std::string = "")=0;
-  virtual void queryInt(const char *, std::string = "")=0;
-  virtual void queryInts(const char *, std::string = "")=0;
-  virtual void queryUnsignedInt(const char *, std::string = "")=0;
-  virtual void queryUnsignedInts(const char *, std::string = "")=0;
-  virtual void queryDouble(const char*, std::string = "")=0;
-  virtual void queryDoubles(const char*, std::string = "")=0;
-  virtual void queryString(const char*, std::string = "")=0;
-  virtual void queryStrings(const char*, std::string = "")=0;
-  virtual void queryAtom(const char*,std::string = "")=0;
-  virtual void queryAtoms(const char*,std::string = "")=0;
-  virtual void queryMolecule(const char*, std::string = "")=0;
-  virtual void queryMolecules(const char*, std::string = "")=0;
-  virtual void queryVector(const char*,bool, std::string = "")=0;
-  virtual void queryVectors(const char*,bool, std::string = "")=0;
-  virtual void queryBox(const char*, std::string = "")=0;
-  virtual void queryElement(const char*, std::string = "")=0;
-  virtual void queryElements(const char*, std::string = "")=0;
-  virtual void queryFile(const char*, std::string = "")=0;
-  virtual void queryFiles(const char*, std::string = "")=0;
-  virtual void queryRandomNumberDistribution_Parameters(const char*, std::string = "")=0;
+  virtual void queryBoolean(Parameter<bool> &, const char *, std::string = "")=0;
+  virtual void queryInt(Parameter<int> &, const char *, std::string = "")=0;
+  virtual void queryInts(Parameter<std::vector<int> > &, const char *, std::string = "")=0;
+  virtual void queryUnsignedInt(Parameter<unsigned int> &, const char *, std::string = "")=0;
+  virtual void queryUnsignedInts(Parameter<std::vector<unsigned int> > &, const char *, std::string = "")=0;
+  virtual void queryDouble(Parameter<double> &, const char*, std::string = "")=0;
+  virtual void queryDoubles(Parameter<std::vector<double> > &, const char*, std::string = "")=0;
+  virtual void queryString(Parameter<std::string> &, const char*, std::string = "")=0;
+  virtual void queryStrings(Parameter<std::vector<std::string> > &, const char*, std::string = "")=0;
+  virtual void queryAtom(Parameter<const atom *> &, const char*,std::string = "")=0;
+  virtual void queryAtoms(Parameter<std::vector<const atom *> > &, const char*,std::string = "")=0;
+  virtual void queryMolecule(Parameter<const molecule *> &, const char*, std::string = "")=0;
+  virtual void queryMolecules(Parameter<std::vector<const molecule *> > &, const char*, std::string = "")=0;
+  virtual void queryVector(Parameter<Vector> &, const char*,bool, std::string = "")=0;
+  virtual void queryVectors(Parameter<std::vector<Vector> > &, const char*,bool, std::string = "")=0;
+  virtual void queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &, const char*, std::string = "")=0;
+  virtual void queryElement(Parameter<const element *> &, const char*, std::string = "")=0;
+  virtual void queryElements(Parameter<std::vector<const element *> > &, const char*, std::string = "")=0;
+  virtual void queryFile(Parameter<boost::filesystem::path> &, const char*, std::string = "")=0;
+  virtual void queryFiles(Parameter< std::vector<boost::filesystem::path> > &, const char*, std::string = "")=0;
+  virtual void queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> &, const char*, std::string = "")=0;
 
   virtual bool display();
@@ -265,25 +266,25 @@
   class BooleanQuery : public Query {
   public:
-    BooleanQuery(std::string title, std::string _description = "");
+    BooleanQuery(Parameter<bool> &param, std::string title, std::string _description = "");
     virtual ~BooleanQuery();
     virtual bool handle()=0;
     virtual void setResult();
   protected:
-    bool tmp;
+    Parameter<bool> &tmp;
   };
 
   class IntQuery : public Query {
   public:
-    IntQuery(std::string title, std::string _description = "");
+    IntQuery(Parameter<int> &param, std::string title, std::string _description = "");
     virtual ~IntQuery();
     virtual bool handle()=0;
     virtual void setResult();
   protected:
-    int tmp;
+    Parameter<int> &tmp;
   };
 
   class IntsQuery : public Query {
   public:
-    IntsQuery(std::string title, std::string _description = "");
+    IntsQuery(Parameter<std::vector<int> > &, std::string title, std::string _description = "");
     virtual ~IntsQuery();
     virtual bool handle()=0;
@@ -291,20 +292,20 @@
   protected:
     int temp;
-    std::vector<int> tmp;
+    Parameter<std::vector<int> > &tmp;
   };
 
   class UnsignedIntQuery : public Query {
   public:
-    UnsignedIntQuery(std::string title, std::string _description = "");
+    UnsignedIntQuery(Parameter<unsigned int> &, std::string title, std::string _description = "");
     virtual ~UnsignedIntQuery();
     virtual bool handle()=0;
     virtual void setResult();
   protected:
-    unsigned int tmp;
+    Parameter<unsigned int> &tmp;
   };
 
   class UnsignedIntsQuery : public Query {
   public:
-    UnsignedIntsQuery(std::string title, std::string _description = "");
+    UnsignedIntsQuery(Parameter<std::vector<unsigned int> > &, std::string title, std::string _description = "");
     virtual ~UnsignedIntsQuery();
     virtual bool handle()=0;
@@ -312,20 +313,20 @@
   protected:
     unsigned int temp;
-    std::vector<unsigned int> tmp;
+    Parameter<std::vector<unsigned int> > &tmp;
   };
 
   class DoubleQuery : public Query {
   public:
-    DoubleQuery(std::string title, std::string _description = "");
+    DoubleQuery(Parameter<double> &, std::string title, std::string _description = "");
     virtual ~DoubleQuery();
     virtual bool handle()=0;
     virtual void setResult();
   protected:
-    double tmp;
+    Parameter<double> &tmp;
   };
 
   class DoublesQuery : public Query {
   public:
-    DoublesQuery(std::string title, std::string _description = "");
+    DoublesQuery(Parameter<std::vector<double> > &, std::string title, std::string _description = "");
     virtual ~DoublesQuery();
     virtual bool handle()=0;
@@ -333,20 +334,20 @@
   protected:
     double temp;
-    std::vector<double> tmp;
+    Parameter<std::vector<double> > &tmp;
   };
 
   class StringQuery : public Query {
   public:
-    StringQuery(std::string title, std::string _description = "");
+    StringQuery(Parameter<std::string> &param, std::string title, std::string _description = "");
     virtual ~StringQuery();
     virtual bool handle()=0;
     virtual void setResult();
   protected:
-    std::string tmp;
+    Parameter<std::string> &tmp;
   };
 
   class StringsQuery : public Query {
   public:
-    StringsQuery(std::string title, std::string _description = "");
+    StringsQuery(Parameter<std::vector<std::string> > &param, std::string title, std::string _description = "");
     virtual ~StringsQuery();
     virtual bool handle()=0;
@@ -354,20 +355,20 @@
   protected:
     std::string temp;
-    std::vector<std::string> tmp;
+    Parameter<std::vector<std::string> > &tmp;
   };
 
   class MoleculeQuery : public Query {
   public:
-    MoleculeQuery(std::string title, std::string _description = "");
+    MoleculeQuery(Parameter<const molecule *> &param, std::string title, std::string _description = "");
     virtual ~MoleculeQuery();
     virtual bool handle()=0;
     virtual void setResult();
   protected:
-    const molecule *tmp;
+    Parameter<const molecule *> &tmp;
   };
 
   class MoleculesQuery : public Query {
   public:
-    MoleculesQuery(std::string title, std::string _description = "");
+    MoleculesQuery(Parameter<std::vector<const molecule *> > &param, std::string title, std::string _description = "");
     virtual ~MoleculesQuery();
     virtual bool handle()=0;
@@ -375,20 +376,20 @@
   protected:
     const molecule * temp;
-    std::vector<const molecule *> tmp;
+    Parameter<std::vector<const molecule *> > &tmp;
   };
 
   class AtomQuery : public Query {
   public:
-    AtomQuery(std::string title, std::string _description = "");
+    AtomQuery(Parameter<const atom *> &param, std::string title, std::string _description = "");
     virtual ~AtomQuery();
     virtual bool handle()=0;
     virtual void setResult();
   protected:
-    const atom *tmp;
+    Parameter<const atom *> &tmp;
   };
 
   class AtomsQuery : public Query {
   public:
-    AtomsQuery(std::string title, std::string _description = "");
+    AtomsQuery(Parameter<std::vector<const atom *> > &param, std::string title, std::string _description = "");
     virtual ~AtomsQuery();
     virtual bool handle()=0;
@@ -396,15 +397,15 @@
   protected:
     const atom *temp;
-    std::vector<const atom *> tmp;
+    Parameter<std::vector<const atom *> > &tmp;
   };
 
   class VectorQuery : public Query {
   public:
-      VectorQuery(std::string title,bool _check, std::string _description = "");
+      VectorQuery(Parameter<Vector> &param, std::string title,bool _check, std::string _description = "");
       virtual ~VectorQuery();
       virtual bool handle()=0;
       virtual void setResult();
     protected:
-      Vector tmp;
+      Parameter<Vector> &tmp;
       bool check;
   };
@@ -412,5 +413,5 @@
   class VectorsQuery : public Query {
   public:
-      VectorsQuery(std::string title,bool _check, std::string _description = "");
+      VectorsQuery(Parameter<std::vector<Vector> > &param, std::string title,bool _check, std::string _description = "");
       virtual ~VectorsQuery();
       virtual bool handle()=0;
@@ -418,31 +419,31 @@
     protected:
       Vector temp;
-      std::vector<Vector> tmp;
+      Parameter<std::vector<Vector> > &tmp;
       bool check;
   };
 
-  class BoxQuery : public Query {
-  public:
-      BoxQuery(std::string title, std::string _description = "");
-      virtual ~BoxQuery();
+  class RealSpaceMatrixQuery : public Query {
+  public:
+      RealSpaceMatrixQuery(Parameter<RealSpaceMatrix> &param, std::string title, std::string _description = "");
+      virtual ~RealSpaceMatrixQuery();
       virtual bool handle()=0;
       virtual void setResult();
     protected:
-      Box tmp;
+      Parameter<RealSpaceMatrix> &tmp;
   };
 
   class ElementQuery : public Query {
   public:
-    ElementQuery(std::string title, std::string _description = "");
+    ElementQuery(Parameter<const element*> &param, std::string title, std::string _description = "");
     virtual ~ElementQuery();
     virtual bool handle()=0;
     virtual void setResult();
   protected:
-    const element * tmp;
+    Parameter<const element *> &tmp;
   };
 
   class ElementsQuery : public Query {
   public:
-    ElementsQuery(std::string title, std::string _description = "");
+    ElementsQuery(Parameter<std::vector<const element *> > &param, std::string title, std::string _description = "");
     virtual ~ElementsQuery();
     virtual bool handle()=0;
@@ -450,35 +451,35 @@
   protected:
     const element *temp;
-    std::vector<const element *> tmp;
+    Parameter<std::vector<const element *> > &tmp;
   };
 
   class FileQuery : public Query {
   public:
-    FileQuery(std::string title, std::string _description = "");
+    FileQuery(Parameter<boost::filesystem::path> &param, std::string title, std::string _description = "");
     virtual ~FileQuery();
     virtual bool handle()=0;
     virtual void setResult();
   protected:
-    boost::filesystem::path tmp;
+    Parameter<boost::filesystem::path> &tmp;
   };
 
   class FilesQuery : public Query {
   public:
-    FilesQuery(std::string title, std::string _description = "");
+    FilesQuery(Parameter<std::vector<boost::filesystem::path> > &param, std::string title, std::string _description = "");
     virtual ~FilesQuery();
     virtual bool handle()=0;
     virtual void setResult();
   protected:
-    std::vector<boost::filesystem::path> tmp;
+    Parameter<std::vector<boost::filesystem::path> > &tmp;
   };
 
   class RandomNumberDistribution_ParametersQuery : public Query {
   public:
-    RandomNumberDistribution_ParametersQuery(std::string title, std::string _description = "");
+    RandomNumberDistribution_ParametersQuery(Parameter<RandomNumberDistribution_Parameters> &param, std::string title, std::string _description = "");
     virtual ~RandomNumberDistribution_ParametersQuery();
     virtual bool handle()=0;
     virtual void setResult();
   protected:
-    RandomNumberDistribution_Parameters tmp;
+    Parameter<RandomNumberDistribution_Parameters> &tmp;
   };
 
Index: src/UIElements/Makefile.am
===================================================================
--- src/UIElements/Makefile.am	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Makefile.am	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -5,5 +5,4 @@
   UIElements/CommandLineUI/Query/AtomsCommandLineQuery.cpp \
   UIElements/CommandLineUI/Query/BooleanCommandLineQuery.cpp \
-  UIElements/CommandLineUI/Query/BoxCommandLineQuery.cpp \
   UIElements/CommandLineUI/Query/DoubleCommandLineQuery.cpp \
   UIElements/CommandLineUI/Query/DoublesCommandLineQuery.cpp \
@@ -17,4 +16,5 @@
   UIElements/CommandLineUI/Query/MoleculeCommandLineQuery.cpp \
   UIElements/CommandLineUI/Query/MoleculesCommandLineQuery.cpp \
+  UIElements/CommandLineUI/Query/RealSpaceMatrixCommandLineQuery.cpp \
   UIElements/CommandLineUI/Query/StringCommandLineQuery.cpp \
   UIElements/CommandLineUI/Query/StringsCommandLineQuery.cpp \
@@ -75,5 +75,4 @@
   UIElements/TextUI/Query/AtomTextQuery.cpp \
   UIElements/TextUI/Query/BooleanTextQuery.cpp \
-  UIElements/TextUI/Query/BoxTextQuery.cpp \
   UIElements/TextUI/Query/DoubleTextQuery.cpp \
   UIElements/TextUI/Query/DoublesTextQuery.cpp \
@@ -87,4 +86,5 @@
   UIElements/TextUI/Query/MoleculesTextQuery.cpp \
   UIElements/TextUI/Query/MoleculeTextQuery.cpp \
+  UIElements/TextUI/Query/RealSpaceMatrixTextQuery.cpp \
   UIElements/TextUI/Query/StringTextQuery.cpp \
   UIElements/TextUI/Query/StringsTextQuery.cpp \
@@ -125,5 +125,4 @@
   UIElements/Query/AtomsQuery.cpp \
   UIElements/Query/BooleanQuery.cpp \
-  UIElements/Query/BoxQuery.cpp \
   UIElements/Query/DoubleQuery.cpp \
   UIElements/Query/DoublesQuery.cpp \
@@ -139,4 +138,5 @@
   UIElements/Query/Query.cpp \
   UIElements/Query/RandomNumberDistribution_ParametersQuery.cpp \
+  UIElements/Query/RealSpaceMatrixQuery.cpp \
   UIElements/Query/StringQuery.cpp \
   UIElements/Query/StringsQuery.cpp \
@@ -161,5 +161,4 @@
   UIElements/Qt4/Pipe/AtomsQtQueryPipe.cpp \
   UIElements/Qt4/Pipe/BooleanQtQueryPipe.cpp \
-  UIElements/Qt4/Pipe/BoxQtQueryPipe.cpp \
   UIElements/Qt4/Pipe/DoubleQtQueryPipe.cpp \
   UIElements/Qt4/Pipe/ElementsQtQueryPipe.cpp \
@@ -175,8 +174,8 @@
   UIElements/Qt4/Pipe/VectorsQtQueryPipe.cpp \
   UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.cpp \
+  UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.cpp \
   UIElements/Qt4/Query/AtomQtQuery.cpp \
   UIElements/Qt4/Query/AtomsQtQuery.cpp \
   UIElements/Qt4/Query/BooleanQtQuery.cpp \
-  UIElements/Qt4/Query/BoxQtQuery.cpp \
   UIElements/Qt4/Query/DoubleQtQuery.cpp \
   UIElements/Qt4/Query/DoublesQtQuery.cpp \
@@ -190,4 +189,5 @@
   UIElements/Qt4/Query/MoleculeQtQuery.cpp \
   UIElements/Qt4/Query/MoleculesQtQuery.cpp \
+  UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp \
   UIElements/Qt4/Query/StringQtQuery.cpp \
   UIElements/Qt4/Query/StringsQtQuery.cpp \
@@ -219,5 +219,4 @@
   UIElements/Qt4/Pipe/AtomsQtQueryPipe.hpp \
   UIElements/Qt4/Pipe/BooleanQtQueryPipe.hpp \
-  UIElements/Qt4/Pipe/BoxQtQueryPipe.hpp \
   UIElements/Qt4/Pipe/DoubleQtQueryPipe.hpp \
   UIElements/Qt4/Pipe/ElementQtQueryPipe.hpp \
@@ -229,4 +228,5 @@
   UIElements/Qt4/Pipe/MoleculesQtQueryPipe.hpp \
   UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.hpp \
+  UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.hpp \
   UIElements/Qt4/Pipe/StringQtQueryPipe.hpp \
   UIElements/Qt4/Pipe/UnsignedIntQtQueryPipe.hpp \
@@ -269,4 +269,5 @@
 	$(BOOST_PROGRAM_OPTIONS_LDFLAGS) \
 	$(BOOST_RANDOM_LDFLAGS) \
+	$(BOOST_SERIALIZATION_LDFLAGS) 
 	$(BOOST_SYSTEM_LDFLAGS) \
 	$(BOOST_THREAD_LDFLAGS)
@@ -284,4 +285,5 @@
 	libMolecuilderFragmentation.la \
 	libMolecuilderParser.la \
+	libMolecuilderParameters.la \
 	libMolecuilderShapes.la \
 	libMolecuilderLinkedCell.la \
@@ -297,8 +299,9 @@
 libMolecuilderUI_la_LIBADD += \
 	${CodePatterns_LIBS} \
-	$(BOOST_SERIALIZATION_LDFLAGS) $(BOOST_SERIALIZATION_LIBS) \
-	$(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LIBS) \
-	$(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_FILESYSTEM_LIBS) \
-	$(BOOST_SYSTEM_LDFLAGS) $(BOOST_SYSTEM_LIBS)
+	$(BOOST_SERIALIZATION_LIBS) \
+	$(BOOST_PROGRAM_OPTIONS_LIBS) \
+	$(BOOST_FILESYSTEM_LIBS) \
+	$(BOOST_SYSTEM_LIBS) \
+	$(BOOST_THREAD_LIBS)
 
 nobase_libMolecuilderUI_la_include_HEADERS = ${UIHEADER}
Index: src/UIElements/Menu/Menu.cpp
===================================================================
--- src/UIElements/Menu/Menu.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Menu/Menu.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -106,5 +106,5 @@
 void Menu::populateActions()
 {
-  // go through all actions and add those beloning to this menu
+  // go through all actions and add those belonging to this menu
   ActionRegistry &AR = ActionRegistry::getInstance();
   for (ActionRegistry::const_iterator iter = AR.getBeginIter();
Index: src/UIElements/Menu/unittests/MenuDescription_ActionRegistry_ConsistencyUnitTest.cpp
===================================================================
--- src/UIElements/Menu/unittests/MenuDescription_ActionRegistry_ConsistencyUnitTest.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Menu/unittests/MenuDescription_ActionRegistry_ConsistencyUnitTest.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -26,4 +26,6 @@
 #include "Actions/ActionRegistry.hpp"
 #include "Actions/ActionTrait.hpp"
+#include "World.hpp"
+#include "WorldTime.hpp"
 
 #include "MenuDescription_ActionRegistry_ConsistencyUnitTest.hpp"
@@ -43,5 +45,5 @@
 void MenuDescription_ActionRegistry_ConsistencyTest::setUp()
 {
-  AR = ActionRegistry::getPointer();
+  CPPUNIT_ASSERT_NO_THROW(AR = ActionRegistry::getPointer());
 };
 
@@ -50,4 +52,9 @@
 {
   ActionRegistry::purgeInstance();
+  // these come about because of the validators accessing them instantiated
+  // by ActionRegistry. In ActionRegistryUnitTest we used stubs for them but
+  // here we care whether default values are actually valid.
+  World::purgeInstance();
+  WorldTime::purgeInstance();
 };
 
Index: src/UIElements/Qt4/Pipe/AtomQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/AtomQtQueryPipe.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/AtomQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,5 +28,5 @@
 
 
-AtomQtQueryPipe::AtomQtQueryPipe(const atom **_content, QtDialog *_dialog, QComboBox *_theBox) :
+AtomQtQueryPipe::AtomQtQueryPipe(Parameter<const atom *> &_content, QtDialog *_dialog, QComboBox *_theBox) :
   content(_content),
   dialog(_dialog),
@@ -40,5 +40,5 @@
   QVariant data = theBox->itemData(newIndex);
   int idx = data.toInt();
-  (*content) = World::getInstance().getAtom(AtomById(idx));
+  content.set(World::getInstance().getAtom(AtomById(idx)));
   dialog->update();
 }
Index: src/UIElements/Qt4/Pipe/AtomQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/AtomQtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/AtomQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include <Qt/qwidget.h>
 
@@ -25,5 +26,5 @@
   Q_OBJECT
 public:
-  AtomQtQueryPipe(const atom **_content, QtDialog *_dialog, QComboBox *_theBox);
+  AtomQtQueryPipe(Parameter<const atom *> &_content, QtDialog *_dialog, QComboBox *_theBox);
   virtual ~AtomQtQueryPipe();
 
@@ -32,5 +33,5 @@
 
 private:
-  const atom **content;
+  Parameter<const atom *> &content;
   QtDialog *dialog;
   QComboBox *theBox;
Index: src/UIElements/Qt4/Pipe/AtomsQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/AtomsQtQueryPipe.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/AtomsQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -30,5 +30,5 @@
 
 
-AtomsQtQueryPipe::AtomsQtQueryPipe(std::vector<const atom *>*_content, QtDialog *_dialog, QListWidget *_theList) :
+AtomsQtQueryPipe::AtomsQtQueryPipe(Parameter<std::vector<const atom *> > &_content, QtDialog *_dialog, QListWidget *_theList) :
   content(_content),
   dialog(_dialog),
@@ -41,7 +41,8 @@
 void AtomsQtQueryPipe::update() {
   // clear target and put all atoms therein
-  (*content).clear();
+  std::vector<const atom *> temp_atoms;
   for (std::set<const atom *>::iterator iter = currentList.begin(); iter != currentList.end(); ++iter)
-    (*content).push_back(*iter);
+    temp_atoms.push_back(*iter);
+  content.set(temp_atoms);
   dialog->update();
 }
@@ -53,5 +54,4 @@
     atom *Walker = World::getInstance().getAtom(AtomById(index));
     if (Walker) {
-      (*content).push_back(Walker);
       currentList.insert(Walker);
       if (lookup.find(index) != lookup.end())
Index: src/UIElements/Qt4/Pipe/AtomsQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/AtomsQtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/AtomsQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include <Qt/qwidget.h>
 
@@ -29,5 +30,5 @@
   Q_OBJECT
 public:
-  AtomsQtQueryPipe(std::vector<const atom *>*_content, QtDialog *_dialog, QListWidget *_theList);
+  AtomsQtQueryPipe(Parameter<std::vector<const atom *> > &_content, QtDialog *_dialog, QListWidget *_theList);
   virtual ~AtomsQtQueryPipe();
 
@@ -38,5 +39,5 @@
 
 private:
-  std::vector<const atom *>*content;
+  Parameter<std::vector<const atom *> > &content;
   std::map<int, const atom *> lookup;
   std::set<const atom *> currentList;
Index: src/UIElements/Qt4/Pipe/BooleanQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/BooleanQtQueryPipe.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/BooleanQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -25,5 +25,5 @@
 #include "CodePatterns/MemDebug.hpp"
 
-BooleanQtQueryPipe::BooleanQtQueryPipe(bool *_content, QtDialog *_dialog, QCheckBox *_booleanCheckBox) :
+BooleanQtQueryPipe::BooleanQtQueryPipe(Parameter<bool> &_content, QtDialog *_dialog, QCheckBox *_booleanCheckBox) :
   content(_content),
   dialog(_dialog),
@@ -35,5 +35,5 @@
 
 void BooleanQtQueryPipe::update(int state) {
-  (*content) = (state == Qt::Checked);
+  content.set(state == Qt::Checked);
   dialog->update();
 }
Index: src/UIElements/Qt4/Pipe/BooleanQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/BooleanQtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/BooleanQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include <Qt/qwidget.h>
 
@@ -23,5 +24,5 @@
   Q_OBJECT
 public:
-  BooleanQtQueryPipe(bool *_content, QtDialog *_dialog, QCheckBox *_booleanCheckBox);
+  BooleanQtQueryPipe(Parameter<bool> &_content, QtDialog *_dialog, QCheckBox *_booleanCheckBox);
   virtual ~BooleanQtQueryPipe();
 
@@ -30,5 +31,5 @@
 
 private:
-  bool *content;
+  Parameter<bool> &content;
   QtDialog *dialog;
   QCheckBox *booleanCheckBox;
Index: src/UIElements/Qt4/Pipe/BoxQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/BoxQtQueryPipe.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ 	(revision )
@@ -1,51 +1,0 @@
-/*
- * Project: MoleCuilder
- * Description: creates and alters molecular systems
- * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
- * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
- */
-
-/*
- * BoxQtQueryPipe.cpp
- *
- *  Created on: Oct 25, 2010
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "UIElements/Qt4/Pipe/BoxQtQueryPipe.hpp"
-#include "UIElements/Qt4/QtDialog.hpp"
-
-#include <Qt/qcombobox.h>
-#include <Qt/qtablewidget.h>
-
-#include "CodePatterns/MemDebug.hpp"
-#include "LinearAlgebra/RealSpaceMatrix.hpp"
-#include "Box.hpp"
-
-BoxQtQueryPipe::BoxQtQueryPipe(Box &_content, QtDialog *_dialog, QTableWidget *_inputTable) :
-  content(_content),
-  dialog(_dialog),
-  inputTable(_inputTable)
-{
-  tmpM = new RealSpaceMatrix();
-  tmpM->setIdentity();
-}
-
-BoxQtQueryPipe::~BoxQtQueryPipe()
-{
-  delete tmpM;
-}
-
-void BoxQtQueryPipe::update(int row, int column)
-{
-  tmpM->at(row, column) = inputTable->item(row, column)->text().toDouble();
-  content.setM(*tmpM);
-  dialog->update();
-}
-
-
Index: src/UIElements/Qt4/Pipe/BoxQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/BoxQtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ 	(revision )
@@ -1,44 +1,0 @@
-/*
- * BoxQtQueryPipe.hpp
- *
- *  Created on: Nov 8, 2010
- *      Author: heber
- */
-
-#ifndef BOXQTQUERYPIPE_HPP_
-#define BOXQTQUERYPIPE_HPP_
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-
-#include <Qt/qwidget.h>
-
-class QTableWidget;
-
-class Box;
-class QtDialog;
-class RealSpaceMatrix;
-
-
-class BoxQtQueryPipe : public QWidget {
-  Q_OBJECT
-public:
-  BoxQtQueryPipe(Box &_content, QtDialog *_dialog, QTableWidget *_inputTable);
-  virtual ~BoxQtQueryPipe();
-
-public slots:
-  void update(int,int);
-
-private:
-  Box &content;
-  QtDialog *dialog;
-  QTableWidget *inputTable;
-
-  RealSpaceMatrix *tmpM;
-};
-
-
-#endif /* BOXQTQUERYPIPE_HPP_ */
Index: src/UIElements/Qt4/Pipe/DoubleQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/DoubleQtQueryPipe.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/DoubleQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -23,5 +23,5 @@
 #include "CodePatterns/MemDebug.hpp"
 
-DoubleQtQueryPipe::DoubleQtQueryPipe(double *_content, QtDialog *_dialog) :
+DoubleQtQueryPipe::DoubleQtQueryPipe(Parameter<double> &_content, QtDialog *_dialog) :
   content(_content),
   dialog(_dialog)
@@ -32,5 +32,5 @@
 
 void DoubleQtQueryPipe::update(double newDbl) {
-  (*content) = newDbl;
+  content.set(newDbl);
   dialog->update();
 }
Index: src/UIElements/Qt4/Pipe/DoubleQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/DoubleQtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/DoubleQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include <Qt/qwidget.h>
 
@@ -22,5 +23,5 @@
   Q_OBJECT
 public:
-  DoubleQtQueryPipe(double *_content, QtDialog *_dialog);
+  DoubleQtQueryPipe(Parameter<double> &_content, QtDialog *_dialog);
   virtual ~DoubleQtQueryPipe();
 
@@ -29,5 +30,5 @@
 
 private:
-  double *content;
+  Parameter<double> &content;
   QtDialog *dialog;
 
Index: src/UIElements/Qt4/Pipe/ElementQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/ElementQtQueryPipe.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/ElementQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -29,5 +29,5 @@
 
 
-ElementQtQueryPipe::ElementQtQueryPipe(const element **_content, QtDialog *_dialog, QComboBox *_theBox) :
+ElementQtQueryPipe::ElementQtQueryPipe(Parameter<const element *> &_content, QtDialog *_dialog, QComboBox *_theBox) :
   content(_content),
   dialog(_dialog),
@@ -41,5 +41,5 @@
   QVariant data = theBox->itemData(newIndex);
   int idx = data.toInt();
-  *content = World::getInstance().getPeriode()->FindElement(idx);
+  content.set(World::getInstance().getPeriode()->FindElement(idx));
   dialog->update();
 }
Index: src/UIElements/Qt4/Pipe/ElementQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/ElementQtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/ElementQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include <Qt/qwidget.h>
 
@@ -25,5 +26,5 @@
   Q_OBJECT
 public:
-  ElementQtQueryPipe(const element **_content, QtDialog *_dialog, QComboBox *_theBox);
+  ElementQtQueryPipe(Parameter<const element *> &_content, QtDialog *_dialog, QComboBox *_theBox);
   virtual ~ElementQtQueryPipe();
 
@@ -32,5 +33,5 @@
 
 private:
-  const element **content;
+  Parameter<const element *> &content;
   QtDialog *dialog;
   QComboBox *theBox;
Index: src/UIElements/Qt4/Pipe/ElementsQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/ElementsQtQueryPipe.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/ElementsQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,5 +31,5 @@
 
 
-ElementsQtQueryPipe::ElementsQtQueryPipe(std::vector<const element *>*_content, QtDialog *_dialog, QComboBox *_theBox) :
+ElementsQtQueryPipe::ElementsQtQueryPipe(Parameter<std::vector<const element *> > &_content, QtDialog *_dialog, QComboBox *_theBox) :
   content(_content),
   dialog(_dialog),
@@ -44,6 +44,8 @@
   int idx = data.toInt();
   const element *elemental = World::getInstance().getPeriode()->FindElement(idx);
+  std::vector<const element *> temp_elements;
   if(elemental)
-    (*content).push_back(elemental);
+    temp_elements.push_back(elemental);
+  content.set(temp_elements);
   dialog->update();
 }
Index: src/UIElements/Qt4/Pipe/ElementsQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/ElementsQtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/ElementsQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include <Qt/qwidget.h>
 
@@ -28,5 +29,5 @@
   Q_OBJECT
 public:
-  ElementsQtQueryPipe(std::vector<const element *>*_content, QtDialog *_dialog, QComboBox *_theBox);
+  ElementsQtQueryPipe(Parameter<std::vector<const element *> > &_content, QtDialog *_dialog, QComboBox *_theBox);
   virtual ~ElementsQtQueryPipe();
 
@@ -35,5 +36,5 @@
 
 private:
-  std::vector<const element *>*content;
+  Parameter<std::vector<const element *> > &content;
   QtDialog *dialog;
   QComboBox *theBox;
Index: src/UIElements/Qt4/Pipe/FileQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/FileQtQueryPipe.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/FileQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,5 +31,5 @@
 #include "UIElements/Qt4/QtDialog.hpp"
 
-FileQtQueryPipe::FileQtQueryPipe(boost::filesystem::path *_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton) :
+FileQtQueryPipe::FileQtQueryPipe(Parameter<boost::filesystem::path> &_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton) :
   content(_content),
   dialog(_dialog),
@@ -49,6 +49,6 @@
   QStringList ListOfFilenames = theFileDialog->selectedFiles();
   std::cout << "Selected File is " << ListOfFilenames.at(0).toStdString() << std::endl;
-  (*content) = ListOfFilenames.at(0).toStdString();
-  filenameLineEdit->setText(QString::fromStdString((*content).string()));
+  content.set(ListOfFilenames.at(0).toStdString());
+  filenameLineEdit->setText(QString::fromStdString(content.get().string()));
   dialog->update();
 }
Index: src/UIElements/Qt4/Pipe/FileQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/FileQtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/FileQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include <Qt/qwidget.h>
 
@@ -27,5 +28,5 @@
   Q_OBJECT
 public:
-  FileQtQueryPipe(boost::filesystem::path *_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton);
+  FileQtQueryPipe(Parameter<boost::filesystem::path> &_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton);
   virtual ~FileQtQueryPipe();
 
@@ -35,5 +36,5 @@
 
 private:
-  boost::filesystem::path *content;
+  Parameter<boost::filesystem::path> &content;
   QtDialog *dialog;
   QLineEdit *filenameLineEdit;
Index: src/UIElements/Qt4/Pipe/IntQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/IntQtQueryPipe.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/IntQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,5 +24,5 @@
 
 
-IntQtQueryPipe::IntQtQueryPipe(int *_content, QtDialog *_dialog) :
+IntQtQueryPipe::IntQtQueryPipe(Parameter<int> &_content, QtDialog *_dialog) :
   content(_content),
   dialog(_dialog)
@@ -33,5 +33,5 @@
 
 void IntQtQueryPipe::update(int newInt) {
-  (*content) = newInt;
+  content.set(newInt);
   dialog->update();
 }
Index: src/UIElements/Qt4/Pipe/IntQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/IntQtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/IntQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include <Qt/qwidget.h>
 
@@ -22,5 +23,5 @@
   Q_OBJECT
 public:
-  IntQtQueryPipe(int *_content, QtDialog *_dialog);
+  IntQtQueryPipe(Parameter<int> &_content, QtDialog *_dialog);
   virtual ~IntQtQueryPipe();
 
@@ -29,5 +30,5 @@
 
 private:
-  int *content;
+  Parameter<int> &content;
   QtDialog *dialog;
 
Index: src/UIElements/Qt4/Pipe/MoleculeQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/MoleculeQtQueryPipe.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/MoleculeQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -29,5 +29,5 @@
 
 
-MoleculeQtQueryPipe::MoleculeQtQueryPipe(const molecule **_content, QtDialog *_dialog, QComboBox *_theBox) :
+MoleculeQtQueryPipe::MoleculeQtQueryPipe(Parameter<const molecule *> &_content, QtDialog *_dialog, QComboBox *_theBox) :
   content(_content),
   dialog(_dialog),
@@ -41,5 +41,5 @@
   QVariant data = theBox->itemData(newIndex);
   int idx = data.toInt();
-  (*content) = World::getInstance().getMolecule(MoleculeById(idx));
+  content.set(World::getInstance().getMolecule(MoleculeById(idx)));
   dialog->update();
 }
Index: src/UIElements/Qt4/Pipe/MoleculeQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/MoleculeQtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/MoleculeQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include <Qt/qwidget.h>
 
@@ -25,5 +26,5 @@
   Q_OBJECT
 public:
-  MoleculeQtQueryPipe(const molecule **_content, QtDialog *_dialog, QComboBox *_theBox);
+  MoleculeQtQueryPipe(Parameter<const molecule *> &_content, QtDialog *_dialog, QComboBox *_theBox);
   virtual ~MoleculeQtQueryPipe();
 
@@ -32,5 +33,5 @@
 
 private:
-  const molecule **content;
+  Parameter<const molecule *> &content;
   QtDialog *dialog;
   QComboBox *theBox;
Index: src/UIElements/Qt4/Pipe/MoleculesQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/MoleculesQtQueryPipe.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/MoleculesQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,5 +31,5 @@
 
 
-MoleculesQtQueryPipe::MoleculesQtQueryPipe(std::vector<const molecule *>*_content, QtDialog *_dialog, QComboBox *_theBox) :
+MoleculesQtQueryPipe::MoleculesQtQueryPipe(Parameter<std::vector<const molecule *> > &_content, QtDialog *_dialog, QComboBox *_theBox) :
   content(_content),
   dialog(_dialog),
@@ -44,6 +44,8 @@
   int idx = data.toInt();
   molecule *mol = World::getInstance().getMolecule(MoleculeById(idx));
+  std::vector<const molecule *> temp_mols;
   if (mol)
-    (*content).push_back(mol);
+    temp_mols.push_back(mol);
+  content.set(temp_mols);
   dialog->update();
 }
Index: src/UIElements/Qt4/Pipe/MoleculesQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/MoleculesQtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/MoleculesQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include <Qt/qwidget.h>
 
@@ -27,5 +28,5 @@
   Q_OBJECT
 public:
-  MoleculesQtQueryPipe(std::vector<const molecule *>*_content, QtDialog *_dialog, QComboBox *_theBox);
+  MoleculesQtQueryPipe(Parameter<std::vector<const molecule *> > &_content, QtDialog *_dialog, QComboBox *_theBox);
   virtual ~MoleculesQtQueryPipe();
 
@@ -34,5 +35,5 @@
 
 private:
-  std::vector<const molecule *>*content;
+  Parameter<std::vector<const molecule *> > &content;
   QtDialog *dialog;
   QComboBox *theBox;
Index: src/UIElements/Qt4/Pipe/QtQueryListPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/QtQueryListPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/QtQueryListPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include "QtQueryPipe.hpp"
 
@@ -23,5 +24,5 @@
 
 
-template<typename T> QtQueryListPipe<T>::QtQueryListPipe(std::vector<T> *_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton) :
+template<typename T> QtQueryListPipe<T>::QtQueryListPipe(Parameter<std::vector<T> > &_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton) :
   content(_content),
   dialog(_dialog),
Index: src/UIElements/Qt4/Pipe/QtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/QtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/QtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -19,4 +19,5 @@
 // since MOC doesn't like nested classes
 
+#include "Parameters/Parameter.hpp"
 #include <Qt/qwidget.h>
 
@@ -33,5 +34,5 @@
 template<typename T> class QtQueryListPipe : public QWidget {
   public:
-    QtQueryListPipe(std::vector<T> *_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton);
+    QtQueryListPipe(Parameter<std::vector<T> > &_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton);
     virtual ~QtQueryListPipe();
     void AddInteger();
@@ -44,5 +45,5 @@
     void RemoveRow(int row);
 
-    std::vector<T> *content;
+    Parameter<std::vector<T> > &content;
     QtDialog *dialog;
     QLineEdit *inputBox;
Index: src/UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -30,5 +30,5 @@
 class RandomNumberDistribution_Parameters;
 
-RandomNumberDistribution_ParametersQtQueryPipe::RandomNumberDistribution_ParametersQtQueryPipe(const RandomNumberDistribution_Parameters *_content, QtDialog *_dialog, QTextEdit *_theBox) :
+RandomNumberDistribution_ParametersQtQueryPipe::RandomNumberDistribution_ParametersQtQueryPipe(Parameter<RandomNumberDistribution_Parameters> &_content, QtDialog *_dialog, QTextEdit *_theBox) :
   content(_content),
   dialog(_dialog),
Index: src/UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include <Qt/qwidget.h>
 
@@ -25,5 +26,5 @@
   Q_OBJECT
 public:
-  RandomNumberDistribution_ParametersQtQueryPipe(const RandomNumberDistribution_Parameters *_content, QtDialog *_dialog, QTextEdit *_theBox);
+  RandomNumberDistribution_ParametersQtQueryPipe(Parameter<RandomNumberDistribution_Parameters> &_content, QtDialog *_dialog, QTextEdit *_theBox);
   virtual ~RandomNumberDistribution_ParametersQtQueryPipe();
 
@@ -32,5 +33,5 @@
 
 private:
-  const RandomNumberDistribution_Parameters *content;
+  Parameter<RandomNumberDistribution_Parameters> &content;
   QtDialog *dialog;
   QTextEdit *theBox;
Index: src/UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
+++ src/UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -0,0 +1,50 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * BoxQtQueryPipe.cpp
+ *
+ *  Created on: Oct 25, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.hpp"
+#include "UIElements/Qt4/QtDialog.hpp"
+
+#include <Qt/qcombobox.h>
+#include <Qt/qtablewidget.h>
+
+#include "CodePatterns/MemDebug.hpp"
+#include "LinearAlgebra/RealSpaceMatrix.hpp"
+
+RealSpaceMatrixQtQueryPipe::RealSpaceMatrixQtQueryPipe(Parameter<RealSpaceMatrix> &_content, QtDialog *_dialog, QTableWidget *_inputTable) :
+  content(_content),
+  dialog(_dialog),
+  inputTable(_inputTable)
+{
+  tmpM = new RealSpaceMatrix();
+  tmpM->setIdentity();
+}
+
+RealSpaceMatrixQtQueryPipe::~RealSpaceMatrixQtQueryPipe()
+{
+  delete tmpM;
+}
+
+void RealSpaceMatrixQtQueryPipe::update(int row, int column)
+{
+  tmpM->at(row, column) = inputTable->item(row, column)->text().toDouble();
+  content.set(*tmpM);
+  dialog->update();
+}
+
+
Index: src/UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
+++ src/UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -0,0 +1,44 @@
+/*
+ * BoxQtQueryPipe.hpp
+ *
+ *  Created on: Nov 8, 2010
+ *      Author: heber
+ */
+
+#ifndef BOXQTQUERYPIPE_HPP_
+#define BOXQTQUERYPIPE_HPP_
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+
+#include "Parameters/Parameter.hpp"
+#include <Qt/qwidget.h>
+
+class QTableWidget;
+
+class QtDialog;
+class RealSpaceMatrix;
+
+
+class RealSpaceMatrixQtQueryPipe : public QWidget {
+  Q_OBJECT
+public:
+  RealSpaceMatrixQtQueryPipe(Parameter<RealSpaceMatrix> &_content, QtDialog *_dialog, QTableWidget *_inputTable);
+  virtual ~RealSpaceMatrixQtQueryPipe();
+
+public slots:
+  void update(int,int);
+
+private:
+  Parameter<RealSpaceMatrix> &content;
+  QtDialog *dialog;
+  QTableWidget *inputTable;
+
+  RealSpaceMatrix *tmpM;
+};
+
+
+#endif /* BOXQTQUERYPIPE_HPP_ */
Index: src/UIElements/Qt4/Pipe/StringQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/StringQtQueryPipe.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/StringQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -26,5 +26,5 @@
 
 
-StringQtQueryPipe::StringQtQueryPipe(std::string *_content, QtDialog *_dialog) :
+StringQtQueryPipe::StringQtQueryPipe(Parameter<std::string> &_content, QtDialog *_dialog) :
   content(_content),
   dialog(_dialog)
@@ -35,5 +35,5 @@
 
 void StringQtQueryPipe::update(const QString& newText) {
-  content->assign(newText.toStdString());
+  content.set(newText.toStdString());
   dialog->update();
 }
Index: src/UIElements/Qt4/Pipe/StringQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/StringQtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/StringQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include <Qt/qwidget.h>
 
@@ -24,5 +25,5 @@
   Q_OBJECT
 public:
-  StringQtQueryPipe(std::string *_content, QtDialog *_dialog);
+  StringQtQueryPipe(Parameter<std::string> &_content, QtDialog *_dialog);
   virtual ~StringQtQueryPipe();
 
@@ -31,5 +32,5 @@
 
 private:
-  std::string *content;
+  Parameter<std::string> &content;
   QtDialog *dialog;
 
Index: src/UIElements/Qt4/Pipe/UnsignedIntQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/UnsignedIntQtQueryPipe.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/UnsignedIntQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,5 +24,5 @@
 
 
-UnsignedIntQtQueryPipe::UnsignedIntQtQueryPipe(unsigned int *_content, QtDialog *_dialog) :
+UnsignedIntQtQueryPipe::UnsignedIntQtQueryPipe(Parameter<unsigned int> &_content, QtDialog *_dialog) :
   content(_content),
   dialog(_dialog)
@@ -33,5 +33,5 @@
 
 void UnsignedIntQtQueryPipe::update(unsigned int newUnsignedInt) {
-  (*content) = newUnsignedInt;
+  content.set(newUnsignedInt);
   dialog->update();
 }
Index: src/UIElements/Qt4/Pipe/UnsignedIntQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/UnsignedIntQtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/UnsignedIntQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include <Qt/qwidget.h>
 
@@ -22,5 +23,5 @@
   Q_OBJECT
 public:
-  UnsignedIntQtQueryPipe(unsigned int *_content, QtDialog *_dialog);
+  UnsignedIntQtQueryPipe(Parameter<unsigned int> &_content, QtDialog *_dialog);
   virtual ~UnsignedIntQtQueryPipe();
 
@@ -29,5 +30,5 @@
 
 private:
-  unsigned int *content;
+  Parameter<unsigned int> &content;
   QtDialog *dialog;
 
Index: src/UIElements/Qt4/Pipe/VectorQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/VectorQtQueryPipe.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/VectorQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -26,5 +26,5 @@
 
 
-VectorQtQueryPipe::VectorQtQueryPipe(Vector *_content, QtDialog *_dialog, QComboBox *_theBox) :
+VectorQtQueryPipe::VectorQtQueryPipe(Parameter<Vector> &_content, QtDialog *_dialog, QComboBox *_theBox) :
   content(_content),
   dialog(_dialog),
@@ -36,15 +36,21 @@
 
 void VectorQtQueryPipe::updateX(double newDouble) {
-  (*content)[0] = newDouble;
+  Vector v = content.get();
+  v[0] = newDouble;
+  content.set(v);
   dialog->update();
 }
 
 void VectorQtQueryPipe::updateY(double newDouble) {
-  (*content)[1] = newDouble;
+  Vector v = content.get();
+  v[1] = newDouble;
+  content.set(v);
   dialog->update();
 }
 
 void VectorQtQueryPipe::updateZ(double newDouble) {
-  (*content)[2] = newDouble;
+  Vector v = content.get();
+  v[2] = newDouble;
+  content.set(v);
   dialog->update();
 }
Index: src/UIElements/Qt4/Pipe/VectorQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/VectorQtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/VectorQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include <Qt/qwidget.h>
 
@@ -25,5 +26,5 @@
   Q_OBJECT
 public:
-  VectorQtQueryPipe(Vector *_content, QtDialog *_dialog, QComboBox *_theBox);
+  VectorQtQueryPipe(Parameter<Vector> &_content, QtDialog *_dialog, QComboBox *_theBox);
   virtual ~VectorQtQueryPipe();
 
@@ -34,5 +35,5 @@
 
 private:
-  Vector *content;
+  Parameter<Vector> &content;
   QtDialog *dialog;
   QComboBox *theBox;
Index: src/UIElements/Qt4/Pipe/VectorsQtQueryPipe.cpp
===================================================================
--- src/UIElements/Qt4/Pipe/VectorsQtQueryPipe.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/VectorsQtQueryPipe.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,5 +28,5 @@
 
 
-VectorsQtQueryPipe::VectorsQtQueryPipe(std::vector<Vector> *_content, QtDialog *_dialog, QComboBox *_theBox) :
+VectorsQtQueryPipe::VectorsQtQueryPipe(Parameter<std::vector<Vector> > &_content, QtDialog *_dialog, QComboBox *_theBox) :
   content(_content),
   dialog(_dialog),
Index: src/UIElements/Qt4/Pipe/VectorsQtQueryPipe.hpp
===================================================================
--- src/UIElements/Qt4/Pipe/VectorsQtQueryPipe.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Pipe/VectorsQtQueryPipe.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include <Qt/qwidget.h>
 
@@ -27,5 +28,5 @@
   Q_OBJECT
 public:
-  VectorsQtQueryPipe(std::vector<Vector>*_content, QtDialog *_dialog, QComboBox *_theBox);
+  VectorsQtQueryPipe(Parameter<std::vector<Vector> > &_content, QtDialog *_dialog, QComboBox *_theBox);
   virtual ~VectorsQtQueryPipe();
 
@@ -34,5 +35,5 @@
 
 private:
-  std::vector<Vector> *content;
+  Parameter<std::vector<Vector> > &content;
   QtDialog *dialog;
   QComboBox *theBox;
Index: src/UIElements/Qt4/QtDialog.cpp
===================================================================
--- src/UIElements/Qt4/QtDialog.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/QtDialog.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -80,107 +80,107 @@
 }
 
-void QtDialog::queryBoolean(const char* title,string)
+void QtDialog::queryBoolean(Parameter<bool> &param, const char* title,string)
 {
-  registerQuery(new BooleanQtQuery(title,inputLayout,this));
+  registerQuery(new BooleanQtQuery(param,title,inputLayout,this));
 }
 
-void QtDialog::queryAtom(const char* title, std::string)
+void QtDialog::queryAtom(Parameter<const atom *> &param, const char* title, std::string)
 {
-  registerQuery(new AtomQtQuery(title,inputLayout,this));
+  registerQuery(new AtomQtQuery(param,title,inputLayout,this));
 }
 
-void QtDialog::queryAtoms(const char* title, std::string)
+void QtDialog::queryAtoms(Parameter<std::vector<const atom *> > &param, const char* title, std::string)
 {
-  registerQuery(new AtomsQtQuery(title,inputLayout,this));
+  registerQuery(new AtomsQtQuery(param,title,inputLayout,this));
 }
 
-void QtDialog::queryBox(const char* title, std::string)
+void QtDialog::queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &param, const char* title, std::string)
 {
-  registerQuery(new BoxQtQuery(title,inputLayout,this));
+  registerQuery(new RealSpaceMatrixQtQuery(param,title,inputLayout,this));
 }
 
-void QtDialog::queryInt(const char *title,string)
+void QtDialog::queryInt(Parameter<int> &param, const char *title,string)
 {
-  registerQuery(new IntQtQuery(title,inputLayout,this));
+  registerQuery(new IntQtQuery(param,title,inputLayout,this));
 }
 
-void QtDialog::queryInts(const char *title,string)
+void QtDialog::queryInts(Parameter<std::vector<int> > &param, const char *title,string)
 {
-  registerQuery(new IntsQtQuery(title,inputLayout,this));
+  registerQuery(new IntsQtQuery(param,title,inputLayout,this));
 }
 
-void QtDialog::queryUnsignedInt(const char *title,string)
+void QtDialog::queryUnsignedInt(Parameter<unsigned int> &param, const char *title,string)
 {
-  registerQuery(new UnsignedIntQtQuery(title,inputLayout,this));
+  registerQuery(new UnsignedIntQtQuery(param,title,inputLayout,this));
 }
 
-void QtDialog::queryUnsignedInts(const char *title,string)
+void QtDialog::queryUnsignedInts(Parameter<std::vector<unsigned int> > &param, const char *title,string)
 {
-  registerQuery(new UnsignedIntsQtQuery(title,inputLayout,this));
+  registerQuery(new UnsignedIntsQtQuery(param,title,inputLayout,this));
 }
 
-void QtDialog::queryDouble(const char* title,string)
+void QtDialog::queryDouble(Parameter<double> &param, const char* title,string)
 {
-  registerQuery(new DoubleQtQuery(title,inputLayout,this));
+  registerQuery(new DoubleQtQuery(param,title,inputLayout,this));
 }
 
-void QtDialog::queryDoubles(const char* title,string)
+void QtDialog::queryDoubles(Parameter<std::vector<double> > &param, const char* title,string)
 {
-  registerQuery(new DoublesQtQuery(title,inputLayout,this));
+  registerQuery(new DoublesQtQuery(param,title,inputLayout,this));
 }
 
-void QtDialog::queryString(const char* title,string)
+void QtDialog::queryString(Parameter<std::string> &param, const char* title,string)
 {
-  registerQuery(new StringQtQuery(title,inputLayout,this));
+  registerQuery(new StringQtQuery(param,title,inputLayout,this));
 }
 
-void QtDialog::queryStrings(const char* title,string)
+void QtDialog::queryStrings(Parameter<std::vector<std::string> > &param, const char* title,string)
 {
-  registerQuery(new StringsQtQuery(title,inputLayout,this));
+  registerQuery(new StringsQtQuery(param, title,inputLayout,this));
 }
 
-void QtDialog::queryMolecule(const char *title,string)
+void QtDialog::queryMolecule(Parameter<const molecule *> &param, const char *title,string)
 {
-  registerQuery(new MoleculeQtQuery(title,inputLayout,this));
+  registerQuery(new MoleculeQtQuery(param,title,inputLayout,this));
 }
 
-void QtDialog::queryMolecules(const char *title,string)
+void QtDialog::queryMolecules(Parameter<std::vector<const molecule *> > &param, const char *title,string)
 {
-  registerQuery(new MoleculesQtQuery(title,inputLayout,this));
+  registerQuery(new MoleculesQtQuery(param, title,inputLayout,this));
 }
 
-void QtDialog::queryVector(const char* title, bool check,string)
+void QtDialog::queryVector(Parameter<Vector> &param, const char* title, bool check,string)
 {
-  registerQuery(new VectorQtQuery(title,check,inputLayout,this));
+  registerQuery(new VectorQtQuery(param,title,check,inputLayout,this));
 }
 
-void QtDialog::queryVectors(const char* title, bool check,string)
+void QtDialog::queryVectors(Parameter<std::vector<Vector> > &param, const char* title, bool check,string)
 {
-  registerQuery(new VectorsQtQuery(title,check,inputLayout,this));
+  registerQuery(new VectorsQtQuery(param, title,check,inputLayout,this));
 }
 
-void QtDialog::queryElement(const char* title, std::string)
+void QtDialog::queryElement(Parameter<const element *> &param, const char* title, std::string)
 {
-  registerQuery(new ElementQtQuery(title,inputLayout,this));
+  registerQuery(new ElementQtQuery(param,title,inputLayout,this));
 }
 
-void QtDialog::queryElements(const char* title, std::string)
+void QtDialog::queryElements(Parameter<std::vector<const element *> > &param, const char* title, std::string)
 {
-  registerQuery(new ElementsQtQuery(title,inputLayout,this));
+  registerQuery(new ElementsQtQuery(param,title,inputLayout,this));
 }
 
-void QtDialog::queryFile(const char* title, std::string)
+void QtDialog::queryFile(Parameter<boost::filesystem::path> &param, const char* title, std::string)
 {
-  registerQuery(new FileQtQuery(title,inputLayout,this));
+  registerQuery(new FileQtQuery(param,title,inputLayout,this));
 }
 
-void QtDialog::queryFiles(const char* title, std::string)
+void QtDialog::queryFiles(Parameter<std::vector< boost::filesystem::path> >&param, const char* title, std::string)
 {
-  registerQuery(new FilesQtQuery(title,inputLayout,this));
+  registerQuery(new FilesQtQuery(param, title,inputLayout,this));
 }
 
-void QtDialog::queryRandomNumberDistribution_Parameters(const char* title, std::string)
+void QtDialog::queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> &param, const char* title, std::string)
 {
-  registerQuery(new RandomNumberDistribution_ParametersQtQuery(title,inputLayout,this));
+  registerQuery(new RandomNumberDistribution_ParametersQtQuery(param,title,inputLayout,this));
 }
 
Index: src/UIElements/Qt4/QtDialog.hpp
===================================================================
--- src/UIElements/Qt4/QtDialog.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/QtDialog.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -15,4 +15,5 @@
 
 
+#include "Parameters/Parameter.hpp"
 #include "UIElements/Dialog.hpp"
 #include <QtGui/QDialog>
@@ -33,25 +34,25 @@
 
   virtual void queryEmpty(const char*, std::string);
-  virtual void queryBoolean(const char *, std::string = "");
-  virtual void queryInt(const char *,std::string = "");
-  virtual void queryInts(const char *,std::string = "");
-  virtual void queryUnsignedInt(const char *,std::string = "");
-  virtual void queryUnsignedInts(const char *,std::string = "");
-  virtual void queryDouble(const char*,std::string = "");
-  virtual void queryDoubles(const char*,std::string = "");
-  virtual void queryString(const char*,std::string = "");
-  virtual void queryStrings(const char*,std::string = "");
-  virtual void queryAtom(const char*,std::string = "");
-  virtual void queryAtoms(const char*,std::string = "");
-  virtual void queryMolecule(const char*,std::string = "");
-  virtual void queryMolecules(const char*,std::string = "");
-  virtual void queryVector(const char*,bool,std::string = "");
-  virtual void queryVectors(const char*,bool,std::string = "");
-  virtual void queryBox(const char*, std::string = "");
-  virtual void queryElement(const char*,std::string = "");
-  virtual void queryElements(const char*,std::string = "");
-  virtual void queryFile(const char*,std::string = "");
-  virtual void queryFiles(const char*,std::string = "");
-  virtual void queryRandomNumberDistribution_Parameters(const char*,std::string = "");
+  virtual void queryBoolean(Parameter<bool> &, const char *, std::string = "");
+  virtual void queryInt(Parameter<int> &, const char *,std::string = "");
+  virtual void queryInts(Parameter<std::vector<int> > &, const char *,std::string = "");
+  virtual void queryUnsignedInt(Parameter<unsigned int> &, const char *,std::string = "");
+  virtual void queryUnsignedInts(Parameter<std::vector<unsigned int> > &, const char *,std::string = "");
+  virtual void queryDouble(Parameter<double> &, const char*,std::string = "");
+  virtual void queryDoubles(Parameter<std::vector<double> > &, const char*,std::string = "");
+  virtual void queryString(Parameter<std::string> &, const char*,std::string = "");
+  virtual void queryStrings(Parameter<std::vector<std::string> > &, const char*,std::string = "");
+  virtual void queryAtom(Parameter<const atom *> &, const char*,std::string = "");
+  virtual void queryAtoms(Parameter<std::vector<const atom *> > &, const char*,std::string = "");
+  virtual void queryMolecule(Parameter<const molecule *> &, const char*,std::string = "");
+  virtual void queryMolecules(Parameter<std::vector<const molecule *> > &, const char*,std::string = "");
+  virtual void queryVector(Parameter<Vector> &, const char*,bool,std::string = "");
+  virtual void queryVectors(Parameter<std::vector<Vector> > &, const char*,bool,std::string = "");
+  virtual void queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &, const char*, std::string = "");
+  virtual void queryElement(Parameter<const element *> &, const char*,std::string = "");
+  virtual void queryElements(Parameter<std::vector<const element *> > &, const char*,std::string = "");
+  virtual void queryFile(Parameter<boost::filesystem::path> &, const char*,std::string = "");
+  virtual void queryFiles(Parameter<std::vector< boost::filesystem::path> > &, const char*,std::string = "");
+  virtual void queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> &, const char*,std::string = "");
 
   virtual bool display();
@@ -63,5 +64,5 @@
   class AtomsQtQuery;
   class BooleanQtQuery;
-  class BoxQtQuery;
+  class RealSpaceMatrixQtQuery;
   class DoubleQtQuery;
   class DoublesQtQuery;
Index: src/UIElements/Qt4/Query/AtomQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/AtomQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/AtomQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -30,6 +30,6 @@
 #include "World.hpp"
 
-QtDialog::AtomQtQuery::AtomQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::AtomQuery(_title),
+QtDialog::AtomQtQuery::AtomQtQuery(Parameter<const atom *> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::AtomQuery(param, _title),
     parent(_parent)
 {
@@ -46,5 +46,5 @@
   thisLayout->addWidget(inputBox);
 
-  pipe = new AtomQtQueryPipe(&tmp,_dialog, inputBox);
+  pipe = new AtomQtQueryPipe(tmp,_dialog, inputBox);
   pipe->update(inputBox->currentIndex());
   connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
Index: src/UIElements/Qt4/Query/AtomsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/AtomsQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/AtomsQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -33,6 +33,6 @@
 
 
-QtDialog::AtomsQtQuery::AtomsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::AtomsQuery(_title),
+QtDialog::AtomsQtQuery::AtomsQtQuery(Parameter<std::vector<const atom *> > &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::AtomsQuery(param, _title),
     parent(_parent)
 {
@@ -67,5 +67,5 @@
   thisHLayout->addLayout(thisV2Layout);
 
-  pipe = new AtomsQtQueryPipe(&tmp,_dialog,inputList);
+  pipe = new AtomsQtQueryPipe(tmp,_dialog,inputList);
   connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
   connect(AddButton,SIGNAL(Clicked()),pipe,SLOT(add()));
Index: src/UIElements/Qt4/Query/BooleanQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/BooleanQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/BooleanQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,11 +28,14 @@
 
 
-QtDialog::BooleanQtQuery::BooleanQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
-    Dialog::BooleanQuery(_title),
+QtDialog::BooleanQtQuery::BooleanQtQuery(Parameter<bool> &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
+    Dialog::BooleanQuery(param, _title),
     parent(_parent)
 {
+  if (!param.isSet())
+    param.set(false);
   thisLayout = new QHBoxLayout();
   titleLabel = new QLabel(QString(getTitle().c_str()),_dialog);
   booleanCheckBox = new QCheckBox(QString(getTitle().c_str()), _dialog);
+  booleanCheckBox->setCheckState(param.get() ? Qt::Checked : Qt::Unchecked);
 
   parent->addLayout(thisLayout);
@@ -40,5 +43,5 @@
   thisLayout->addWidget(booleanCheckBox);
 
-  pipe = new BooleanQtQueryPipe(&tmp,_dialog,booleanCheckBox);
+  pipe = new BooleanQtQueryPipe(tmp,_dialog,booleanCheckBox);
   connect(booleanCheckBox, SIGNAL(stateChanged(int)), pipe, SLOT(update(int)));
 }
Index: src/UIElements/Qt4/Query/BoxQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/BoxQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*
- * Project: MoleCuilder
- * Description: creates and alters molecular systems
- * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
- * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
- */
-
-/*
- * BoxQtQuery.cpp
- *
- *  Created on: Oct 25, 2010
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <Qt/qboxlayout.h>
-#include <Qt/qlabel.h>
-#include <Qt/qtablewidget.h>
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "UIElements/Qt4/Query/QtQuery.hpp"
-#include "UIElements/Qt4/Pipe/BoxQtQueryPipe.hpp"
-
-#include "LinearAlgebra/RealSpaceMatrix.hpp"
-#include "World.hpp"
-
-QtDialog::BoxQtQuery::BoxQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::BoxQuery(_title),
-    parent(_parent)
-{
-  thisLayout = new QHBoxLayout();
-  titleLabel = new QLabel(QString(getTitle().c_str()));
-
-  // init input table
-  inputTable = new QTableWidget(3,3, _dialog);
-  QStringList CoordinateList;
-  CoordinateList << "x" << "y" << "z";
-  inputTable->setHorizontalHeaderLabels(CoordinateList);
-  inputTable->setVerticalHeaderLabels(CoordinateList);
-
-  pipe = new BoxQtQueryPipe(tmp,_dialog, inputTable);
-
-  // fill the box with current matrix
-  const RealSpaceMatrix &domain = World::getInstance().getDomain().getM();
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++) {
-      QTableWidgetItem *newItem = new QTableWidgetItem(tr("%1").arg(domain.at(i,j)));
-      inputTable->setItem(i,j,newItem);
-      pipe->update(i,j);
-    }
-
-  parent->addLayout(thisLayout);
-  thisLayout->addWidget(titleLabel);
-  thisLayout->addWidget(inputTable);
-
-  connect(inputTable,SIGNAL(cellChanged(int,int)),pipe,SLOT(update(int,int)));
-}
-
-QtDialog::BoxQtQuery::~BoxQtQuery()
-{
-  delete pipe;
-}
-
-bool QtDialog::BoxQtQuery::handle() {
-  return true;
-}
-
-
Index: src/UIElements/Qt4/Query/DoubleQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/DoubleQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/DoubleQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,12 +28,14 @@
 
 
-QtDialog::DoubleQtQuery::DoubleQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::DoubleQuery(title),
+QtDialog::DoubleQtQuery::DoubleQtQuery(Parameter<double> &param, std::string title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::DoubleQuery(param, title),
     parent(_parent)
 {
+  if (!param.isSet())
+    param.set(0.0);
   thisLayout = new QHBoxLayout();
   titleLabel = new QLabel(QString(getTitle().c_str()));
   inputBox = new QDoubleSpinBox();
-  inputBox->setValue(0);
+  inputBox->setValue(param.get());
   inputBox->setRange(-std::numeric_limits<double>::max(),std::numeric_limits<double>::max());
   inputBox->setDecimals(3);
@@ -42,5 +44,5 @@
   thisLayout->addWidget(inputBox);
 
-  pipe = new DoubleQtQueryPipe(&tmp,_dialog);
+  pipe = new DoubleQtQueryPipe(tmp,_dialog);
   pipe->update(inputBox->value());
   connect(inputBox,SIGNAL(valueChanged(double)),pipe,SLOT(update(double)));
Index: src/UIElements/Qt4/Query/DoublesQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/DoublesQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/DoublesQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -30,6 +30,6 @@
 
 
-QtDialog::DoublesQtQuery::DoublesQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::DoublesQuery(title),
+QtDialog::DoublesQtQuery::DoublesQtQuery(Parameter<std::vector<double> > &param, std::string title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::DoublesQuery(param, title),
     parent(_parent)
 {
@@ -60,5 +60,5 @@
   thisHLayout->addLayout(thisV2Layout);
 
-  pipe = new QtQueryListPipe<double>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
+  pipe = new QtQueryListPipe<double>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
   connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
   connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
Index: src/UIElements/Qt4/Query/ElementQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/ElementQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/ElementQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 #include "World.hpp"
 
-QtDialog::ElementQtQuery::ElementQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
-    Dialog::ElementQuery(_title),
+QtDialog::ElementQtQuery::ElementQtQuery(Parameter<const element *> &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
+    Dialog::ElementQuery(param, _title),
     parent(_parent)
 {
@@ -51,5 +51,5 @@
   thisLayout->addWidget(inputBox);
 
-  pipe = new ElementQtQueryPipe(&tmp,_dialog,inputBox);
+  pipe = new ElementQtQueryPipe(tmp,_dialog,inputBox);
   pipe->update(inputBox->currentIndex());
   connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
Index: src/UIElements/Qt4/Query/ElementsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/ElementsQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/ElementsQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -32,6 +32,6 @@
 
 
-QtDialog::ElementsQtQuery::ElementsQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
-    Dialog::ElementsQuery(_title),
+QtDialog::ElementsQtQuery::ElementsQtQuery(Parameter<std::vector<const element *> > &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
+    Dialog::ElementsQuery(param, _title),
     parent(_parent)
 {
@@ -52,5 +52,5 @@
   thisLayout->addWidget(inputBox);
 
-  pipe = new ElementsQtQueryPipe(&tmp,_dialog,inputBox);
+  pipe = new ElementsQtQueryPipe(tmp,_dialog,inputBox);
   pipe->update(inputBox->currentIndex());
   connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
Index: src/UIElements/Qt4/Query/FileQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/FileQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/FileQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -29,6 +29,6 @@
 
 
-QtDialog::FileQtQuery::FileQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
-    Dialog::FileQuery(_title),
+QtDialog::FileQtQuery::FileQtQuery(Parameter<boost::filesystem::path> &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
+    Dialog::FileQuery(param, _title),
     parent(_parent)
 {
@@ -43,5 +43,5 @@
   filedialogButton = new QPushButton("&Choose", _dialog);
 
-  pipe = new FileQtQueryPipe(&tmp,_dialog,filenameLineEdit,filedialogButton);
+  pipe = new FileQtQueryPipe(tmp,_dialog,filenameLineEdit,filedialogButton);
 
   thisLayout = new QHBoxLayout();
Index: src/UIElements/Qt4/Query/FilesQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/FilesQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/FilesQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -26,10 +26,12 @@
 #include "CodePatterns/MemDebug.hpp"
 
+#include <boost/filesystem/path.hpp>
+
 #include "UIElements/Qt4/Query/QtQuery.hpp"
 #include "UIElements/Qt4/Pipe/QtQueryListPipe.hpp"
 
 
-QtDialog::FilesQtQuery::FilesQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
-    Dialog::FilesQuery(_title),
+QtDialog::FilesQtQuery::FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
+    Dialog::FilesQuery(param, _title),
     parent(_parent)
 {
@@ -60,5 +62,5 @@
   thisHLayout->addLayout(thisV2Layout);
 
-  pipe = new QtQueryListPipe<boost::filesystem::path>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
+  pipe = new QtQueryListPipe<boost::filesystem::path>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
   connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
   connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
Index: src/UIElements/Qt4/Query/IntQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/IntQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/IntQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,17 +28,19 @@
 
 
-QtDialog::IntQtQuery::IntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::IntQuery(_title),
+QtDialog::IntQtQuery::IntQtQuery(Parameter<int> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::IntQuery(param, _title),
     parent(_parent)
 {
+  if (!param.isSet())
+    param.set(0);
   thisLayout = new QHBoxLayout();
   titleLabel = new QLabel(QString(getTitle().c_str()));
   inputBox = new QSpinBox();
-  inputBox->setValue(0);
+  inputBox->setValue(param.get());
   parent->addLayout(thisLayout);
   thisLayout->addWidget(titleLabel);
   thisLayout->addWidget(inputBox);
 
-  pipe = new IntQtQueryPipe(&tmp,_dialog);
+  pipe = new IntQtQueryPipe(tmp,_dialog);
   pipe->update(inputBox->value());
   connect(inputBox,SIGNAL(valueChanged(int)),pipe,SLOT(update(int)));
Index: src/UIElements/Qt4/Query/IntsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/IntsQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/IntsQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -30,6 +30,6 @@
 
 
-QtDialog::IntsQtQuery::IntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::IntsQuery(_title),
+QtDialog::IntsQtQuery::IntsQtQuery(Parameter<std::vector<int> > &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::IntsQuery(param, _title),
     parent(_parent)
 {
@@ -60,5 +60,5 @@
   thisHLayout->addLayout(thisV2Layout);
 
-  pipe = new QtQueryListPipe<int>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
+  pipe = new QtQueryListPipe<int>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
   connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
   connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
Index: src/UIElements/Qt4/Query/MoleculeQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/MoleculeQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/MoleculeQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 
 
-QtDialog::MoleculeQtQuery::MoleculeQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::MoleculeQuery(_title),
+QtDialog::MoleculeQtQuery::MoleculeQtQuery(Parameter<const molecule *> &param, std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::MoleculeQuery(param, _title),
     parent(_parent)
 {
@@ -51,5 +51,5 @@
   thisLayout->addWidget(inputBox);
 
-  pipe = new MoleculeQtQueryPipe(&tmp,_dialog,inputBox);
+  pipe = new MoleculeQtQueryPipe(tmp,_dialog,inputBox);
   pipe->update(inputBox->currentIndex());
   connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
Index: src/UIElements/Qt4/Query/MoleculesQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/MoleculesQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/MoleculesQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 
 
-QtDialog::MoleculesQtQuery::MoleculesQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::MoleculesQuery(_title),
+QtDialog::MoleculesQtQuery::MoleculesQtQuery(Parameter<std::vector<const molecule *> > &param, std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::MoleculesQuery(param, _title),
     parent(_parent)
 {
@@ -51,5 +51,5 @@
   thisLayout->addWidget(inputBox);
 
-  pipe = new MoleculesQtQueryPipe(&tmp,_dialog,inputBox);
+  pipe = new MoleculesQtQueryPipe(tmp,_dialog,inputBox);
   pipe->update(inputBox->currentIndex());
   connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
Index: src/UIElements/Qt4/Query/QtQuery.hpp
===================================================================
--- src/UIElements/Qt4/Query/QtQuery.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/QtQuery.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -16,4 +16,5 @@
 
 #include "Qt4/QtDialog.hpp"
+#include "Parameters/Parameter.hpp"
 
 class QHBoxLayout;
@@ -36,5 +37,5 @@
 class AtomsQtQueryPipe;
 class BooleanQtQueryPipe;
-class BoxQtQueryPipe;
+class RealSpaceMatrixQtQueryPipe;
 class DoubleQtQueryPipe;
 class DoublesQtQueryPipe;
@@ -43,4 +44,5 @@
 class EmptyQtQueryPipe;
 class FileQtQueryPipe;
+class FilesQtQueryPipe;
 class IntQtQueryPipe;
 class MoleculeQtQueryPipe;
@@ -56,5 +58,5 @@
 class QtDialog::AtomQtQuery : public Dialog::AtomQuery {
 public:
-  AtomQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
+  AtomQtQuery(Parameter<const atom *> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~AtomQtQuery();
   virtual bool handle();
@@ -70,5 +72,5 @@
 class QtDialog::AtomsQtQuery : public Dialog::AtomsQuery {
 public:
-  AtomsQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
+  AtomsQtQuery(Parameter<std::vector<const atom *> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~AtomsQtQuery();
   virtual bool handle();
@@ -85,5 +87,5 @@
 class QtDialog::BooleanQtQuery : public Dialog::BooleanQuery {
 public:
-  BooleanQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
+  BooleanQtQuery(Parameter<bool> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
   virtual ~BooleanQtQuery();
   virtual bool handle();
@@ -97,8 +99,8 @@
 };
 
-class QtDialog::BoxQtQuery : public Dialog::BoxQuery {
-public:
-  BoxQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
-  virtual ~BoxQtQuery();
+class QtDialog::RealSpaceMatrixQtQuery : public Dialog::RealSpaceMatrixQuery {
+public:
+  RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
+  virtual ~RealSpaceMatrixQtQuery();
   virtual bool handle();
 private:
@@ -108,10 +110,10 @@
   QTableWidget *inputTable;
 
-  BoxQtQueryPipe *pipe;
+  RealSpaceMatrixQtQueryPipe *pipe;
 };
 
 class QtDialog::DoubleQtQuery : public Dialog::DoubleQuery {
 public:
-  DoubleQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog);
+  DoubleQtQuery(Parameter<double> &, std::string title,QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~DoubleQtQuery();
   virtual bool handle();
@@ -127,5 +129,5 @@
 class QtDialog::DoublesQtQuery : public Dialog::DoublesQuery {
 public:
-  DoublesQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog);
+  DoublesQtQuery(Parameter<std::vector<double> > &, std::string title,QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~DoublesQtQuery();
   virtual bool handle();
@@ -141,5 +143,5 @@
 class QtDialog::ElementQtQuery : public Dialog::ElementQuery {
 public:
-  ElementQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
+  ElementQtQuery(Parameter<const element *> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
   virtual ~ElementQtQuery();
   virtual bool handle();
@@ -155,5 +157,5 @@
 class QtDialog::ElementsQtQuery : public Dialog::ElementsQuery {
 public:
-  ElementsQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
+  ElementsQtQuery(Parameter<std::vector<const element *> > &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
   virtual ~ElementsQtQuery();
   virtual bool handle();
@@ -182,5 +184,5 @@
 class QtDialog::FileQtQuery : public Dialog::FileQuery {
 public:
-  FileQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
+  FileQtQuery(Parameter<boost::filesystem::path> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
   virtual ~FileQtQuery();
   virtual bool handle();
@@ -197,5 +199,5 @@
 class QtDialog::FilesQtQuery : public Dialog::FilesQuery {
 public:
-  FilesQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
+  FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
   virtual ~FilesQtQuery();
   virtual bool handle();
@@ -214,5 +216,5 @@
 class QtDialog::IntQtQuery : public Dialog::IntQuery {
 public:
-  IntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
+  IntQtQuery(Parameter<int> &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~IntQtQuery();
   virtual bool handle();
@@ -228,5 +230,5 @@
 class QtDialog::IntsQtQuery : public Dialog::IntsQuery {
 public:
-  IntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
+  IntsQtQuery(Parameter<std::vector<int> > &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~IntsQtQuery();
   virtual bool handle();
@@ -245,5 +247,5 @@
 class QtDialog::MoleculeQtQuery : public Dialog::MoleculeQuery {
 public:
-  MoleculeQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
+  MoleculeQtQuery(Parameter<const molecule *> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~MoleculeQtQuery();
   virtual bool handle();
@@ -259,5 +261,5 @@
 class QtDialog::MoleculesQtQuery : public Dialog::MoleculesQuery {
 public:
-  MoleculesQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
+  MoleculesQtQuery(Parameter<std::vector<const molecule *> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~MoleculesQtQuery();
   virtual bool handle();
@@ -273,5 +275,5 @@
 class QtDialog::StringQtQuery : public Dialog::StringQuery {
 public:
-  StringQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
+  StringQtQuery(Parameter<std::string> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~StringQtQuery();
   virtual bool handle();
@@ -287,5 +289,5 @@
 class QtDialog::StringsQtQuery : public Dialog::StringsQuery {
 public:
-  StringsQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
+  StringsQtQuery(Parameter<std::vector<std::string> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~StringsQtQuery();
   virtual bool handle();
@@ -301,5 +303,5 @@
 class QtDialog::UnsignedIntQtQuery : public Dialog::UnsignedIntQuery {
 public:
-  UnsignedIntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
+  UnsignedIntQtQuery(Parameter<unsigned int> &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~UnsignedIntQtQuery();
   virtual bool handle();
@@ -315,5 +317,5 @@
 class QtDialog::UnsignedIntsQtQuery : public Dialog::UnsignedIntsQuery {
 public:
-  UnsignedIntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
+  UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~UnsignedIntsQtQuery();
   virtual bool handle();
@@ -333,5 +335,5 @@
 class QtDialog::VectorQtQuery : public Dialog::VectorQuery {
 public:
-  VectorQtQuery(std::string title,bool _check,QBoxLayout *,QtDialog *);
+  VectorQtQuery(Parameter<Vector> &, std::string title,bool _check,QBoxLayout *,QtDialog *);
   virtual ~VectorQtQuery();
   virtual bool handle();
@@ -352,5 +354,5 @@
 class QtDialog::VectorsQtQuery : public Dialog::VectorsQuery {
 public:
-  VectorsQtQuery(std::string title,bool _check,QBoxLayout *,QtDialog *);
+  VectorsQtQuery(Parameter<std::vector<Vector> > &, std::string title,bool _check,QBoxLayout *,QtDialog *);
   virtual ~VectorsQtQuery();
   virtual bool handle();
@@ -369,5 +371,5 @@
 class QtDialog::RandomNumberDistribution_ParametersQtQuery : public Dialog::RandomNumberDistribution_ParametersQuery {
 public:
-  RandomNumberDistribution_ParametersQtQuery(std::string title,QBoxLayout *,QtDialog *);
+  RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title,QBoxLayout *,QtDialog *);
   virtual ~RandomNumberDistribution_ParametersQtQuery();
   virtual bool handle();
Index: src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 #include "World.hpp"
 
-QtDialog::RandomNumberDistribution_ParametersQtQuery::RandomNumberDistribution_ParametersQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::RandomNumberDistribution_ParametersQuery(_title),
+QtDialog::RandomNumberDistribution_ParametersQtQuery::RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::RandomNumberDistribution_ParametersQuery(param, _title),
     parent(_parent)
 {
@@ -50,5 +50,5 @@
   okButton = new QPushButton(tr("Ok"));
 
-  pipe = new RandomNumberDistribution_ParametersQtQueryPipe(&tmp,_dialog, inputBox);
+  pipe = new RandomNumberDistribution_ParametersQtQueryPipe(tmp,_dialog, inputBox);
   connect(okButton,SIGNAL(clicked()),pipe,SLOT(update()));
 }
Index: src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
+++ src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -0,0 +1,73 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * BoxQtQuery.cpp
+ *
+ *  Created on: Oct 25, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <Qt/qboxlayout.h>
+#include <Qt/qlabel.h>
+#include <Qt/qtablewidget.h>
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "UIElements/Qt4/Query/QtQuery.hpp"
+#include "UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.hpp"
+
+#include "LinearAlgebra/RealSpaceMatrix.hpp"
+#include "World.hpp"
+
+QtDialog::RealSpaceMatrixQtQuery::RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::RealSpaceMatrixQuery(param, _title),
+    parent(_parent)
+{
+  thisLayout = new QHBoxLayout();
+  titleLabel = new QLabel(QString(getTitle().c_str()));
+
+  // init input table
+  inputTable = new QTableWidget(3,3, _dialog);
+  QStringList CoordinateList;
+  CoordinateList << "x" << "y" << "z";
+  inputTable->setHorizontalHeaderLabels(CoordinateList);
+  inputTable->setVerticalHeaderLabels(CoordinateList);
+
+  pipe = new RealSpaceMatrixQtQueryPipe(tmp,_dialog, inputTable);
+
+  // fill the box with current matrix
+  const RealSpaceMatrix &domain = World::getInstance().getDomain().getM();
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++) {
+      QTableWidgetItem *newItem = new QTableWidgetItem(tr("%1").arg(domain.at(i,j)));
+      inputTable->setItem(i,j,newItem);
+      pipe->update(i,j);
+    }
+
+  parent->addLayout(thisLayout);
+  thisLayout->addWidget(titleLabel);
+  thisLayout->addWidget(inputTable);
+
+  connect(inputTable,SIGNAL(cellChanged(int,int)),pipe,SLOT(update(int,int)));
+}
+
+QtDialog::RealSpaceMatrixQtQuery::~RealSpaceMatrixQtQuery()
+{
+  delete pipe;
+}
+
+bool QtDialog::RealSpaceMatrixQtQuery::handle() {
+  return true;
+}
+
+
Index: src/UIElements/Qt4/Query/StringQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/StringQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/StringQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,8 +28,10 @@
 
 
-QtDialog::StringQtQuery::StringQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::StringQuery(_title),
+QtDialog::StringQtQuery::StringQtQuery(Parameter<std::string> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::StringQuery(param, _title),
     parent(_parent)
 {
+  if (!param.isSet())
+    param.set("");
   thisLayout = new QHBoxLayout();
   titleLabel = new QLabel(QString(getTitle().c_str()));
@@ -39,5 +41,5 @@
   thisLayout->addWidget(inputBox);
 
-  pipe = new StringQtQueryPipe(&tmp,_dialog);
+  pipe = new StringQtQueryPipe(tmp,_dialog);
   pipe->update(inputBox->text());
   connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(update(const QString&)));
@@ -52,5 +54,5 @@
 bool QtDialog::StringQtQuery::handle()
 {
-  return tmp!="";
+  return tmp.get() != "";
 }
 
Index: src/UIElements/Qt4/Query/StringsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/StringsQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/StringsQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -30,6 +30,6 @@
 
 
-QtDialog::StringsQtQuery::StringsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::StringsQuery(_title),
+QtDialog::StringsQtQuery::StringsQtQuery(Parameter<std::vector<std::string> > &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::StringsQuery(param, _title),
     parent(_parent)
 {
@@ -60,5 +60,5 @@
   thisHLayout->addLayout(thisV2Layout);
 
-  pipe = new QtQueryListPipe<std::string>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
+  pipe = new QtQueryListPipe<std::string>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
   connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
   connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
@@ -76,12 +76,14 @@
   // dissect by ","
   std::string::iterator olditer = temp.begin();
+  std::vector<std::string> temp_strings;
   for(std::string::iterator iter = temp.begin(); iter != temp.end(); ++iter) {
     if (*iter == ' ') {
-      tmp.push_back(std::string(iter, olditer));
+      temp_strings.push_back(std::string(iter, olditer));
       olditer = iter;
     }
   }
   if (olditer != temp.begin())  // insert last part also
-    tmp.push_back(std::string(olditer, temp.end()));
+    temp_strings.push_back(std::string(olditer, temp.end()));
+  tmp.set(temp_strings);
 
   return temp!="";
Index: src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,17 +28,19 @@
 
 
-QtDialog::UnsignedIntQtQuery::UnsignedIntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::UnsignedIntQuery(_title),
+QtDialog::UnsignedIntQtQuery::UnsignedIntQtQuery(Parameter<unsigned int> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::UnsignedIntQuery(param, _title),
     parent(_parent)
 {
+  if (!param.isSet())
+    param.set(0);
   thisLayout = new QHBoxLayout();
   titleLabel = new QLabel(QString(getTitle().c_str()));
   inputBox = new QSpinBox();
-  inputBox->setValue(0);
+  inputBox->setValue(param.get());
   parent->addLayout(thisLayout);
   thisLayout->addWidget(titleLabel);
   thisLayout->addWidget(inputBox);
 
-  pipe = new UnsignedIntQtQueryPipe(&tmp,_dialog);
+  pipe = new UnsignedIntQtQueryPipe(tmp,_dialog);
   pipe->update(inputBox->value());
   connect(inputBox,SIGNAL(valueChanged(unsigned int)),pipe,SLOT(update(unsigned int)));
Index: src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -30,6 +30,6 @@
 
 
-QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::UnsignedIntsQuery(_title),
+QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::UnsignedIntsQuery(param, _title),
     parent(_parent)
 {
@@ -60,5 +60,5 @@
   thisHLayout->addLayout(thisV2Layout);
 
-  pipe = new QtQueryListPipe<unsigned int>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
+  pipe = new QtQueryListPipe<unsigned int>(tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
   connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
   connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
Index: src/UIElements/Qt4/Query/VectorQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/VectorQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/VectorQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -29,8 +29,10 @@
 
 
-QtDialog::VectorQtQuery::VectorQtQuery(std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::VectorQuery(title,_check),
+QtDialog::VectorQtQuery::VectorQtQuery(Parameter<Vector> &param, std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::VectorQuery(param, title,_check),
     parent(_parent)
 {
+  if (!param.isSet())
+    param.set(Vector(0,0,0));
   mainLayout= new QHBoxLayout();
   titleLabel = new QLabel(QString(getTitle().c_str()));
@@ -45,4 +47,5 @@
   coordInputX = new QDoubleSpinBox();
   coordInputX->setRange(-std::numeric_limits<double>::max(),std::numeric_limits<double>::max());
+  coordInputX->setValue(param.get()[0]);
 //  coordInputX->setRange(0,M.at(i,i));
   coordInputX->setDecimals(3);
@@ -50,4 +53,5 @@
   coordInputY = new QDoubleSpinBox();
   coordInputY->setRange(-std::numeric_limits<double>::max(),std::numeric_limits<double>::max());
+  coordInputY->setValue(param.get()[1]);
 //  coordInputY->setRange(0,M.at(i,i));
   coordInputY->setDecimals(3);
@@ -55,8 +59,9 @@
   coordInputZ = new QDoubleSpinBox();
   coordInputZ->setRange(-std::numeric_limits<double>::max(),std::numeric_limits<double>::max());
+  coordInputZ->setValue(param.get()[2]);
 //  coordInputZ->setRange(0,M.at(i,i));
   coordInputZ->setDecimals(3);
   coordLayout->addWidget(coordInputZ);
-  pipe = new VectorQtQueryPipe(&(tmp),_dialog,inputBox);
+  pipe = new VectorQtQueryPipe(tmp,_dialog,inputBox);
   //pipe->update(coordInput->value());
   connect(coordInputX,SIGNAL(valueChanged(double)),pipe,SLOT(updateX(double)));
Index: src/UIElements/Qt4/Query/VectorsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/VectorsQtQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Qt4/Query/VectorsQtQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -29,6 +29,6 @@
 
 
-QtDialog::VectorsQtQuery::VectorsQtQuery(std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :
-    Dialog::VectorsQuery(title,_check),
+QtDialog::VectorsQtQuery::VectorsQtQuery(Parameter<std::vector<Vector> > &param, std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :
+    Dialog::VectorsQuery(param, title,_check),
     parent(_parent)
 {
@@ -47,5 +47,5 @@
   coordInput->setDecimals(3);
   coordLayout->addWidget(coordInput);
-  pipe = new VectorsQtQueryPipe(&(tmp),_dialog,inputBox);
+  pipe = new VectorsQtQueryPipe(tmp,_dialog,inputBox);
   //pipe->update(coordInput->value());
   connect(coordInput,SIGNAL(valueChanged(double)),pipe,SLOT(update(double)));
Index: src/UIElements/Query/AtomQuery.cpp
===================================================================
--- src/UIElements/Query/AtomQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/AtomQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -23,7 +23,7 @@
 
 // Atom Queries
-Dialog::AtomQuery::AtomQuery(std::string title, std::string _description) :
+Dialog::AtomQuery::AtomQuery(Parameter<const atom *> &param, std::string title, std::string _description) :
     Query(title, _description),
-    tmp(0)
+    tmp(param)
 {}
 
@@ -31,5 +31,5 @@
 
 void Dialog::AtomQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/AtomsQuery.cpp
===================================================================
--- src/UIElements/Query/AtomsQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/AtomsQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,7 +24,7 @@
 
 // Atoms Queries
-Dialog::AtomsQuery::AtomsQuery(std::string title, std::string _description) :
+Dialog::AtomsQuery::AtomsQuery(Parameter<std::vector<const atom *> > &param, std::string title, std::string _description) :
     Query(title, _description),
-    tmp(0)
+    tmp(param)
 {}
 
@@ -32,5 +32,5 @@
 
 void Dialog::AtomsQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/BooleanQuery.cpp
===================================================================
--- src/UIElements/Query/BooleanQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/BooleanQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,7 +24,7 @@
 
 // Bool Queries
-Dialog::BooleanQuery::BooleanQuery(std::string title,std::string description) :
+Dialog::BooleanQuery::BooleanQuery(Parameter<bool> &param, std::string title,std::string description) :
     Query(title, description),
-    tmp(false)
+    tmp(param)
 {}
 
@@ -32,5 +32,5 @@
 
 void Dialog::BooleanQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/BoxQuery.cpp
===================================================================
--- src/UIElements/Query/BoxQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ 	(revision )
@@ -1,36 +1,0 @@
-/*
- * Project: MoleCuilder
- * Description: creates and alters molecular systems
- * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
- * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
- */
-
-/*
- * BoxQuery.cpp
- *
- *  Created on: Oct 25, 2010
- *      Author: heber
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include "Dialog.hpp"
-#include "Actions/ValueStorage.hpp"
-
-
-// Box Queries
-Dialog::BoxQuery::BoxQuery(std::string title, std::string _description) :
-  Query(title, _description)
-{}
-
-Dialog::BoxQuery::~BoxQuery()
-{}
-
-void Dialog::BoxQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
-}
-
Index: src/UIElements/Query/DoubleQuery.cpp
===================================================================
--- src/UIElements/Query/DoubleQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/DoubleQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,7 +24,7 @@
 
 // Double Queries
-Dialog::DoubleQuery::DoubleQuery(std::string title, std::string _description) :
+Dialog::DoubleQuery::DoubleQuery(Parameter<double> &param, std::string title, std::string _description) :
     Query(title, _description),
-    tmp(0)
+    tmp(param)
 {}
 
@@ -32,5 +32,5 @@
 
 void Dialog::DoubleQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/DoublesQuery.cpp
===================================================================
--- src/UIElements/Query/DoublesQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/DoublesQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,6 +24,7 @@
 
 // Doubles Queries
-Dialog::DoublesQuery::DoublesQuery(std::string title, std::string _description) :
-    Query(title, _description)
+Dialog::DoublesQuery::DoublesQuery(Parameter<std::vector<double> > &param, std::string title, std::string _description) :
+    Query(title, _description),
+    tmp(param)
 {}
 
@@ -31,5 +32,5 @@
 
 void Dialog::DoublesQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/ElementQuery.cpp
===================================================================
--- src/UIElements/Query/ElementQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/ElementQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,6 +24,7 @@
 
 // Element Queries
-Dialog::ElementQuery::ElementQuery(std::string title, std::string _description) :
-  Query(title, _description)
+Dialog::ElementQuery::ElementQuery(Parameter<const element *> &param, std::string title, std::string _description) :
+  Query(title, _description),
+  tmp(param)
   {}
 
@@ -31,5 +32,5 @@
 
 void Dialog::ElementQuery::setResult(){
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/ElementsQuery.cpp
===================================================================
--- src/UIElements/Query/ElementsQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/ElementsQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,6 +24,7 @@
 
 // Elements Queries
-Dialog::ElementsQuery::ElementsQuery(std::string title, std::string _description) :
-  Query(title, _description)
+Dialog::ElementsQuery::ElementsQuery(Parameter<std::vector<const element *> > &param, std::string title, std::string _description) :
+  Query(title, _description),
+  tmp(param)
   {}
 
@@ -31,5 +32,5 @@
 
 void Dialog::ElementsQuery::setResult(){
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/FileQuery.cpp
===================================================================
--- src/UIElements/Query/FileQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/FileQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,6 +24,7 @@
 
 // File Queries
-Dialog::FileQuery::FileQuery(std::string title, std::string _description) :
-  Query(title, _description)
+Dialog::FileQuery::FileQuery(Parameter<boost::filesystem::path> &param, std::string title, std::string _description) :
+  Query(title, _description),
+  tmp(param)
   {}
 
@@ -31,5 +32,5 @@
 
 void Dialog::FileQuery::setResult(){
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/FilesQuery.cpp
===================================================================
--- src/UIElements/Query/FilesQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/FilesQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,6 +24,7 @@
 
 // File Queries
-Dialog::FilesQuery::FilesQuery(std::string title, std::string _description) :
-  Query(title, _description)
+Dialog::FilesQuery::FilesQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string title, std::string _description) :
+  Query(title, _description),
+  tmp(param)
   {}
 
@@ -31,5 +32,5 @@
 
 void Dialog::FilesQuery::setResult(){
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/IntQuery.cpp
===================================================================
--- src/UIElements/Query/IntQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/IntQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,7 +24,7 @@
 
 // Int Queries
-Dialog::IntQuery::IntQuery(std::string title, std::string description) :
+Dialog::IntQuery::IntQuery(Parameter<int> &param, std::string title, std::string description) :
     Query(title, description),
-    tmp(0)
+    tmp(param)
 {}
 
@@ -32,5 +32,5 @@
 
 void Dialog::IntQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/IntsQuery.cpp
===================================================================
--- src/UIElements/Query/IntsQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/IntsQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,6 +24,7 @@
 
 // Ints Queries
-Dialog::IntsQuery::IntsQuery(std::string title, std::string description) :
-    Query(title, description)
+Dialog::IntsQuery::IntsQuery(Parameter<std::vector<int> > &param, std::string title, std::string description) :
+    Query(title, description),
+    tmp(param)
 {}
 
@@ -31,5 +32,5 @@
 
 void Dialog::IntsQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/MoleculeQuery.cpp
===================================================================
--- src/UIElements/Query/MoleculeQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/MoleculeQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,7 +24,7 @@
 
 // Molecule Queries
-Dialog::MoleculeQuery::MoleculeQuery(std::string title, std::string _description) :
+Dialog::MoleculeQuery::MoleculeQuery(Parameter<const molecule *> &param, std::string title, std::string _description) :
     Query(title, _description),
-    tmp(0)
+    tmp(param)
 {}
 
@@ -32,5 +32,5 @@
 
 void Dialog::MoleculeQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/MoleculesQuery.cpp
===================================================================
--- src/UIElements/Query/MoleculesQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/MoleculesQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,7 +24,7 @@
 
 // Molecules Queries
-Dialog::MoleculesQuery::MoleculesQuery(std::string title, std::string _description) :
+Dialog::MoleculesQuery::MoleculesQuery(Parameter<std::vector<const molecule *> > &param, std::string title, std::string _description) :
     Query(title, _description),
-    tmp(0)
+    tmp(param)
 {}
 
@@ -32,5 +32,5 @@
 
 void Dialog::MoleculesQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/RandomNumberDistribution_ParametersQuery.cpp
===================================================================
--- src/UIElements/Query/RandomNumberDistribution_ParametersQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/RandomNumberDistribution_ParametersQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -23,6 +23,7 @@
 
 // RandomNumberDistribution_Parameters Queries
-Dialog::RandomNumberDistribution_ParametersQuery::RandomNumberDistribution_ParametersQuery(std::string title, std::string _description) :
-    Query(title, _description)
+Dialog::RandomNumberDistribution_ParametersQuery::RandomNumberDistribution_ParametersQuery(Parameter<RandomNumberDistribution_Parameters> &param, std::string title, std::string _description) :
+    Query(title, _description),
+    tmp(param)
 {}
 
@@ -30,5 +31,5 @@
 
 void Dialog::RandomNumberDistribution_ParametersQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/RealSpaceMatrixQuery.cpp
===================================================================
--- src/UIElements/Query/RealSpaceMatrixQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
+++ src/UIElements/Query/RealSpaceMatrixQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -0,0 +1,37 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * BoxQuery.cpp
+ *
+ *  Created on: Oct 25, 2010
+ *      Author: heber
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include "Dialog.hpp"
+#include "Actions/ValueStorage.hpp"
+
+
+// Box Queries
+Dialog::RealSpaceMatrixQuery::RealSpaceMatrixQuery(Parameter<RealSpaceMatrix> &param, std::string title, std::string _description) :
+  Query(title, _description),
+  tmp(param)
+{}
+
+Dialog::RealSpaceMatrixQuery::~RealSpaceMatrixQuery()
+{}
+
+void Dialog::RealSpaceMatrixQuery::setResult() {
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+}
+
Index: src/UIElements/Query/StringQuery.cpp
===================================================================
--- src/UIElements/Query/StringQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/StringQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,6 +24,7 @@
 
 // String Queries
-Dialog::StringQuery::StringQuery(std::string title,std::string _description) :
-    Query(title, _description)
+Dialog::StringQuery::StringQuery(Parameter<std::string> &param, std::string title,std::string _description) :
+    Query(title, _description),
+    tmp(param)
 {}
 
@@ -31,5 +32,5 @@
 
 void Dialog::StringQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/StringsQuery.cpp
===================================================================
--- src/UIElements/Query/StringsQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/StringsQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,6 +24,7 @@
 
 // Strings Queries
-Dialog::StringsQuery::StringsQuery(std::string title,std::string _description) :
-    Query(title, _description)
+Dialog::StringsQuery::StringsQuery(Parameter<std::vector<std::string> > &param, std::string title,std::string _description) :
+    Query(title, _description),
+    tmp(param)
 {}
 
@@ -31,5 +32,5 @@
 
 void Dialog::StringsQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/UnsignedIntQuery.cpp
===================================================================
--- src/UIElements/Query/UnsignedIntQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/UnsignedIntQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,7 +24,7 @@
 
 // UnsignedInt Queries
-Dialog::UnsignedIntQuery::UnsignedIntQuery(std::string title, std::string description) :
+Dialog::UnsignedIntQuery::UnsignedIntQuery(Parameter<unsigned int> &param, std::string title, std::string description) :
     Query(title, description),
-    tmp(0)
+    tmp(param)
 {}
 
@@ -32,5 +32,5 @@
 
 void Dialog::UnsignedIntQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/UnsignedIntsQuery.cpp
===================================================================
--- src/UIElements/Query/UnsignedIntsQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/UnsignedIntsQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,6 +24,7 @@
 
 // UnsignedInts Queries
-Dialog::UnsignedIntsQuery::UnsignedIntsQuery(std::string title, std::string description) :
-    Query(title, description)
+Dialog::UnsignedIntsQuery::UnsignedIntsQuery(Parameter<std::vector<unsigned int> > &param, std::string title, std::string description) :
+    Query(title, description),
+    tmp(param)
 {}
 
@@ -31,5 +32,5 @@
 
 void Dialog::UnsignedIntsQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/VectorQuery.cpp
===================================================================
--- src/UIElements/Query/VectorQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/VectorQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,6 +24,7 @@
 
 // Vector Queries
-Dialog::VectorQuery::VectorQuery(std::string title,bool _check, std::string _description) :
+Dialog::VectorQuery::VectorQuery(Parameter<Vector> &param, std::string title,bool _check, std::string _description) :
   Query(title, _description),
+  tmp(param),
   check(_check)
 {}
@@ -33,5 +34,5 @@
 
 void Dialog::VectorQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/Query/VectorsQuery.cpp
===================================================================
--- src/UIElements/Query/VectorsQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/Query/VectorsQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -24,6 +24,7 @@
 
 // Vectors Queries
-Dialog::VectorsQuery::VectorsQuery(std::string title,bool _check, std::string _description) :
+Dialog::VectorsQuery::VectorsQuery(Parameter<std::vector<Vector> > &param, std::string title,bool _check, std::string _description) :
   Query(title, _description),
+  tmp(param),
   check(_check)
 {}
@@ -33,5 +34,5 @@
 
 void Dialog::VectorsQuery::setResult() {
-  ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
+  //ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp);
 }
 
Index: src/UIElements/TextUI/Query/AtomTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/AtomTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/AtomTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -30,6 +30,6 @@
 #include "World.hpp"
 
-TextDialog::AtomTextQuery::AtomTextQuery(std::string title, std::string _description) :
-    Dialog::AtomQuery(title,_description)
+TextDialog::AtomTextQuery::AtomTextQuery(Parameter<const atom *> &param, std::string title, std::string _description) :
+    Dialog::AtomQuery(param, title,_description)
 {}
 
@@ -51,9 +51,10 @@
     }
 
-    tmp = World::getInstance().getAtom(AtomById(idxOfAtom));
-    if(!tmp && idxOfAtom!=-1){
+    const atom * temp_atom = World::getInstance().getAtom(AtomById(idxOfAtom));
+    if(!temp_atom && idxOfAtom!=-1){
       std::cout << "Invalid Atom Index" << idxOfAtom << std::endl;
       badInput = true;
     }
+    tmp.set(temp_atom);
 
   } while(badInput);
Index: src/UIElements/TextUI/Query/AtomsTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/AtomsTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/AtomsTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 
 
-TextDialog::AtomsTextQuery::AtomsTextQuery(std::string title, std::string _description) :
-    Dialog::AtomsQuery(title,_description)
+TextDialog::AtomsTextQuery::AtomsTextQuery(Parameter<std::vector<const atom *> > &param, std::string title, std::string _description) :
+    Dialog::AtomsQuery(param, title,_description)
 {}
 
@@ -44,4 +44,5 @@
   // dissect by " "
   std::string::iterator olditer = line.begin();
+  std::vector<const atom *> temp_atoms;
   for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
     if (*iter == ' ') {
@@ -53,5 +54,5 @@
         break;
       }
-      tmp.push_back(temp);
+      temp_atoms.push_back(temp);
       olditer = iter;
     }
@@ -63,7 +64,8 @@
     if(!temp && idxOfAtom!=-1) {
       std::cout << "Invalid Atom Index" << idxOfAtom << std::endl;
-      tmp.push_back(temp);
+      temp_atoms.push_back(temp);
     }
   }
+  tmp.set(temp_atoms);
 
   return (idxOfAtom!=-1);
Index: src/UIElements/TextUI/Query/BooleanTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/BooleanTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/BooleanTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,6 +28,6 @@
 
 
-TextDialog::BooleanTextQuery::BooleanTextQuery(std::string title, std::string _description) :
-    Dialog::BooleanQuery(title,_description)
+TextDialog::BooleanTextQuery::BooleanTextQuery(Parameter<bool> &param, std::string title, std::string _description) :
+    Dialog::BooleanQuery(param, title,_description)
 {}
 
@@ -42,7 +42,7 @@
     std::cin >> input;
     if ((input == 'y' ) || (input == 'Y')) {
-      tmp = true;
+      tmp.set(true);
     } else if ((input == 'n' ) || (input == 'N')) {
-      tmp = false;
+      tmp.set(false);
     } else {
       badInput=true;
Index: src/UIElements/TextUI/Query/BoxTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/BoxTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/*
- * Project: MoleCuilder
- * Description: creates and alters molecular systems
- * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
- * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
- */
-
-/*
- * BoxTextQuery.cpp
- *
- *  Created on: Oct 25, 2010
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "CodePatterns/MemDebug.hpp"
-
-#include <iostream>
-
-#include "TextUI/Query/TextQuery.hpp"
-
-#include "CodePatterns/Log.hpp"
-#include "CodePatterns/Verbose.hpp"
-#include "LinearAlgebra/RealSpaceMatrix.hpp"
-
-
-TextDialog::BoxTextQuery::BoxTextQuery(std::string title, std::string _description) :
-    Dialog::BoxQuery(title,_description)
-{}
-
-TextDialog::BoxTextQuery::~BoxTextQuery()
-{}
-
-bool TextDialog::BoxTextQuery::handle() {
-  std::cout << getTitle();
-
-  double temp[6];
-  std::cout << getDescription() << " - ";
-  std::string coords[6] = {"xx","yx","yy", "zx", "zy", "zz"};
-  for (int i=0;i<6;i++) {
-    std::cout << coords[i] << ": ";
-    std::cin >> temp[i];
-  }
-  RealSpaceMatrix M;
-  M.set(0,0, temp[0]);
-  M.set(0,1, temp[1]);
-  M.set(0,2, temp[2]);
-  M.set(1,0, temp[1]);
-  M.set(1,1, temp[3]);
-  M.set(1,2, temp[4]);
-  M.set(2,0, temp[2]);
-  M.set(2,1, temp[4]);
-  M.set(2,2, temp[5]);
-  tmp.setM(M);
-  return true;
-}
-
Index: src/UIElements/TextUI/Query/DoubleTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/DoubleTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/DoubleTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,6 +28,6 @@
 
 
-TextDialog::DoubleTextQuery::DoubleTextQuery(std::string title, std::string _description) :
-    Dialog::DoubleQuery(title,_description)
+TextDialog::DoubleTextQuery::DoubleTextQuery(Parameter<double> &param, std::string title, std::string _description) :
+    Dialog::DoubleQuery(param, title,_description)
 {}
 
@@ -38,6 +38,7 @@
   do{
     badInput = false;
-    std::cout << getDescription() << ": ";
-    std::cin >> tmp;
+    std::cout << getDescription() << ": ";\
+    double temp_double;
+    std::cin >> temp_double;
     if(std::cin.fail()){
       badInput = true;
@@ -46,4 +47,5 @@
       std::cout << "Input was not a number!" << std::endl;
     }
+    tmp.set(temp_double);
   }while(badInput);
   std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
Index: src/UIElements/TextUI/Query/DoublesTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/DoublesTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/DoublesTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,6 +28,6 @@
 
 
-TextDialog::DoublesTextQuery::DoublesTextQuery(std::string title, std::string _description) :
-    Dialog::DoublesQuery(title,_description)
+TextDialog::DoublesTextQuery::DoublesTextQuery(Parameter<std::vector<double> > &param, std::string title, std::string _description) :
+    Dialog::DoublesQuery(param, title,_description)
 {}
 
@@ -40,9 +40,10 @@
   // dissect by " "
   std::string::iterator olditer = line.begin();
+  std::vector<double> temp_doubles;
   for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
     if (*iter == ' ') {
       std::istringstream stream(std::string(iter, olditer));
       stream >> temp;
-      tmp.push_back(temp);
+      temp_doubles.push_back(temp);
       olditer = iter;
     }
@@ -51,6 +52,7 @@
     std::istringstream stream(std::string(olditer, line.end()));
     stream >> temp;
-    tmp.push_back(temp);
+    temp_doubles.push_back(temp);
   }
+  tmp.set(temp_doubles);
 
   return true;
Index: src/UIElements/TextUI/Query/ElementTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/ElementTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/ElementTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 
 
-TextDialog::ElementTextQuery::ElementTextQuery(std::string title, std::string _description) :
-    Dialog::ElementQuery(title,_description)
+TextDialog::ElementTextQuery::ElementTextQuery(Parameter<const element *> &param, std::string title, std::string _description) :
+    Dialog::ElementQuery(param, title,_description)
 {}
 
Index: src/UIElements/TextUI/Query/ElementsTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/ElementsTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/ElementsTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -35,6 +35,6 @@
 
 
-TextDialog::ElementsTextQuery::ElementsTextQuery(std::string title, std::string _description) :
-    Dialog::ElementsQuery(title,_description)
+TextDialog::ElementsTextQuery::ElementsTextQuery(Parameter<std::vector<const element *> > &param, std::string title, std::string _description) :
+    Dialog::ElementsQuery(param, title,_description)
 {}
 
@@ -50,4 +50,5 @@
   // dissect by " "
   std::string::iterator olditer = line.begin();
+  std::vector<const element *> temp_elements;
   for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
     if (*iter == ' ') {
@@ -64,5 +65,5 @@
         break;
       }
-      tmp.push_back(temp);
+      temp_elements.push_back(temp);
       olditer = iter;
     }
@@ -79,7 +80,8 @@
     if(!temp && Z!=-1) {
       std::cout << "Invalid Element" << shorthand << std::endl;
-      tmp.push_back(temp);
+      temp_elements.push_back(temp);
     }
   }
+  tmp.set(temp_elements);
 
   return (Z!=-1);
Index: src/UIElements/TextUI/Query/FileTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/FileTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/FileTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 
 
-TextDialog::FileTextQuery::FileTextQuery(std::string title, std::string _description) :
-    Dialog::FileQuery(title,_description)
+TextDialog::FileTextQuery::FileTextQuery(Parameter<boost::filesystem::path> &param, std::string title, std::string _description) :
+    Dialog::FileQuery(param, title,_description)
 {}
 
@@ -48,10 +48,10 @@
       std::cin.clear();
       std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-      std::cout << "Input was not a number!" << std::endl;
+      std::cout << "Input was not a file!" << std::endl;
       continue;
     }
   } while(badInput);
   std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-  tmp = tempstring;
+  tmp.set(tempstring);
   return true;
 }
Index: src/UIElements/TextUI/Query/FilesTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/FilesTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/FilesTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 
 
-TextDialog::FilesTextQuery::FilesTextQuery(std::string title, std::string _description) :
-    Dialog::FilesQuery(title,_description)
+TextDialog::FilesTextQuery::FilesTextQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string title, std::string _description) :
+    Dialog::FilesQuery(param, title,_description)
 {}
 
@@ -38,25 +38,32 @@
 
 bool TextDialog::FilesTextQuery::handle() {
-  std::string tempstring;
-  boost::filesystem::path tempfile;
-  do{
-    std::cout << getDescription() << ": ";
+  std::vector<boost::filesystem::path> tempfiles;
+  bool badInput = false;
+  bool continueflag = true;
+  do {
+    std::string tempstring;
+    do{
+      badInput = false;
+      std::cout << getDescription() << ": ";
+      std::cin >> tempstring;
+      if(std::cin.fail()){
+        badInput = true;
+        std::cin.clear();
+        std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
+        std::cout << "Input was not a valid file!" << std::endl;
+        continue;
+      }
+    } while(badInput);
+    boost::filesystem::path tempfile;
+    tempfile = tempstring;
+    std::cout << "Enter another file [y/n]? ";
     std::cin >> tempstring;
-    if (std::cin.fail()) {
-      std::cin.clear();
-      std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-      std::cout << "Input was not a valid string!" << std::endl;
-      continue;
-    }
-    tempfile = tempstring;
-    if (boost::filesystem::exists(tempfile)) {
-      tmp.push_back(tempfile);
-    } else {
-      ELOG(1, "File " << tempstring << " cannot be found.");
-      tempstring = std::string();
-    }
-  } while(tempstring != std::string());
+    if (tempstring != "y")
+      continueflag = false;
+    tempfiles.push_back(tempfile);
+  } while(continueflag);
   std::cin.ignore(std::numeric_limits<streamsize>::max(),'\n');
-  return !tmp.empty();
+  tmp.set(tempfiles);
+  return true;
 }
 
Index: src/UIElements/TextUI/Query/IntTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/IntTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/IntTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,6 +28,6 @@
 
 
-TextDialog::IntTextQuery::IntTextQuery(std::string title, std::string _description) :
-    Dialog::IntQuery(title,_description)
+TextDialog::IntTextQuery::IntTextQuery(Parameter<int> &param, std::string title, std::string _description) :
+    Dialog::IntQuery(param, title,_description)
 {}
 
@@ -39,5 +39,7 @@
     badInput = false;
     std::cout << getDescription() << ": ";
-    std::cin >> tmp;
+    int temp_int;
+    std::cin >> temp_int;
+    tmp.set(temp_int);
     if(std::cin.fail()){
       badInput=true;
Index: src/UIElements/TextUI/Query/IntsTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/IntsTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/IntsTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,6 +28,6 @@
 
 
-TextDialog::IntsTextQuery::IntsTextQuery(std::string title, std::string _description) :
-    Dialog::IntsQuery(title,_description)
+TextDialog::IntsTextQuery::IntsTextQuery(Parameter<std::vector<int> > &param, std::string title, std::string _description) :
+    Dialog::IntsQuery(param, title,_description)
 {}
 
@@ -39,4 +39,5 @@
   getline(std::cin,line);
   // dissect by " "
+  std::vector<int> temp_int;
   std::string::iterator olditer = line.begin();
   for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
@@ -44,5 +45,5 @@
       std::istringstream stream(std::string(iter, olditer));
       stream >> temp;
-      tmp.push_back(temp);
+      temp_int.push_back(temp);
       olditer = iter;
     }
@@ -51,6 +52,7 @@
     std::istringstream stream(std::string(olditer, line.end()));
     stream >> temp;
-    tmp.push_back(temp);
+    temp_int.push_back(temp);
   }
+  tmp.set(temp_int);
 
   return true;
Index: src/UIElements/TextUI/Query/MoleculeTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/MoleculeTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/MoleculeTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 
 
-TextDialog::MoleculeTextQuery::MoleculeTextQuery(std::string title, std::string _description) :
-    Dialog::MoleculeQuery(title,_description)
+TextDialog::MoleculeTextQuery::MoleculeTextQuery(Parameter<const molecule *> &param, std::string title, std::string _description) :
+    Dialog::MoleculeQuery(param, title,_description)
 {}
 
@@ -52,9 +52,10 @@
     }
 
-    tmp = World::getInstance().getMolecule(MoleculeById(idxOfMol));
-    if(!tmp && idxOfMol!=-1){
+    const molecule *temp_mol = World::getInstance().getMolecule(MoleculeById(idxOfMol));
+    if(!temp_mol && idxOfMol!=-1){
       std::cout << "Invalid Molecule Index" << std::endl;
       badInput = true;
     }
+    tmp.set(temp_mol);
 
   } while(badInput);
Index: src/UIElements/TextUI/Query/MoleculesTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/MoleculesTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/MoleculesTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 
 
-TextDialog::MoleculesTextQuery::MoleculesTextQuery(std::string title, std::string _description) :
-    Dialog::MoleculesQuery(title,_description)
+TextDialog::MoleculesTextQuery::MoleculesTextQuery(Parameter<std::vector<const molecule *> > &param, std::string title, std::string _description) :
+    Dialog::MoleculesQuery(param, title,_description)
 {}
 
@@ -43,4 +43,5 @@
   getline(std::cin,line);
   // dissect by " "
+  std::vector<const molecule *> temp_mols;
   std::string::iterator olditer = line.begin();
   for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
@@ -53,5 +54,5 @@
         break;
       }
-      tmp.push_back(temp);
+      temp_mols.push_back(temp);
       olditer = iter;
     }
@@ -63,7 +64,8 @@
     if(!temp && idxOfMol!=-1){
       std::cout << "Invalid Molecule Index" << idxOfMol << std::endl;
-      tmp.push_back(temp);
+      temp_mols.push_back(temp);
     }
   }
+  tmp.set(temp_mols);
 
   return (idxOfMol!=-1);
Index: src/UIElements/TextUI/Query/RandomNumberDistribution_ParametersTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/RandomNumberDistribution_ParametersTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/RandomNumberDistribution_ParametersTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -30,6 +30,6 @@
 #include "RandomNumbers/RandomNumberDistribution_Parameters.hpp"
 
-TextDialog::RandomNumberDistribution_ParametersTextQuery::RandomNumberDistribution_ParametersTextQuery(std::string title, std::string _description) :
-    Dialog::RandomNumberDistribution_ParametersQuery(title,_description)
+TextDialog::RandomNumberDistribution_ParametersTextQuery::RandomNumberDistribution_ParametersTextQuery(Parameter<RandomNumberDistribution_Parameters> &param, std::string title, std::string _description) :
+    Dialog::RandomNumberDistribution_ParametersQuery(param, title,_description)
 {}
 
@@ -43,5 +43,7 @@
     std::cout << "Please enter parameters as follows: 'p=0.5;'";
     std::cout << "Empty line terminates." << std::endl;
-    std::cin >> tmp;
+    RandomNumberDistribution_Parameters temp_params;
+    std::cin >> temp_params;
+    tmp.set(temp_params);
     if(std::cin.fail()){
       badInput = true;
Index: src/UIElements/TextUI/Query/RealSpaceMatrixTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/RealSpaceMatrixTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
+++ src/UIElements/TextUI/Query/RealSpaceMatrixTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -0,0 +1,61 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010-2012 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * BoxTextQuery.cpp
+ *
+ *  Created on: Oct 25, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "CodePatterns/MemDebug.hpp"
+
+#include <iostream>
+
+#include "TextUI/Query/TextQuery.hpp"
+
+#include "CodePatterns/Log.hpp"
+#include "CodePatterns/Verbose.hpp"
+#include "LinearAlgebra/RealSpaceMatrix.hpp"
+
+
+TextDialog::RealSpaceMatrixTextQuery::RealSpaceMatrixTextQuery(Parameter<RealSpaceMatrix> &param, std::string title, std::string _description) :
+    Dialog::RealSpaceMatrixQuery(param, title,_description)
+{}
+
+TextDialog::RealSpaceMatrixTextQuery::~RealSpaceMatrixTextQuery()
+{}
+
+bool TextDialog::RealSpaceMatrixTextQuery::handle() {
+  std::cout << getTitle();
+
+  double temp[6];
+  std::cout << getDescription() << " - ";
+  std::string coords[6] = {"xx","yx","yy", "zx", "zy", "zz"};
+  for (int i=0;i<6;i++) {
+    std::cout << coords[i] << ": ";
+    std::cin >> temp[i];
+  }
+  RealSpaceMatrix M;
+  M.set(0,0, temp[0]);
+  M.set(0,1, temp[1]);
+  M.set(0,2, temp[2]);
+  M.set(1,0, temp[1]);
+  M.set(1,1, temp[3]);
+  M.set(1,2, temp[4]);
+  M.set(2,0, temp[2]);
+  M.set(2,1, temp[4]);
+  M.set(2,2, temp[5]);
+  tmp.set(M);
+  return true;
+}
+
Index: src/UIElements/TextUI/Query/StringTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/StringTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/StringTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,6 +28,6 @@
 
 
-TextDialog::StringTextQuery::StringTextQuery(std::string title, std::string _description) :
-    Dialog::StringQuery(title,_description)
+TextDialog::StringTextQuery::StringTextQuery(Parameter<std::string> &param, std::string title, std::string _description) :
+    Dialog::StringQuery(param, title,_description)
 {}
 
@@ -36,5 +36,7 @@
 bool TextDialog::StringTextQuery::handle() {
   std::cout << getDescription() << ": ";
-  getline(std::cin,tmp);
+  std::string temp_string;
+  getline(std::cin,temp_string);
+  tmp.set(temp_string);
   return true;
 }
Index: src/UIElements/TextUI/Query/StringsTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/StringsTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/StringsTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,6 +28,6 @@
 
 
-TextDialog::StringsTextQuery::StringsTextQuery(std::string title, std::string _description) :
-    Dialog::StringsQuery(title,_description)
+TextDialog::StringsTextQuery::StringsTextQuery(Parameter<std::vector<std::string> > &param, std::string title, std::string _description) :
+    Dialog::StringsQuery(param, title,_description)
 {}
 
@@ -38,13 +38,15 @@
   getline(std::cin,temp);
   // dissect by " "
+  std::vector<std::string> temp_strings;
   std::string::iterator olditer = temp.begin();
   for(std::string::iterator iter = temp.begin(); iter != temp.end(); ++iter) {
     if (*iter == ' ') {
-      tmp.push_back(std::string(iter, olditer));
+      temp_strings.push_back(std::string(iter, olditer));
       olditer = iter;
     }
   }
   if (olditer != temp.begin())  // insert last part also
-    tmp.push_back(std::string(olditer, temp.end()));
+    temp_strings.push_back(std::string(olditer, temp.end()));
+  tmp.set(temp_strings);
 
   return true;
Index: src/UIElements/TextUI/Query/TextQuery.hpp
===================================================================
--- src/UIElements/TextUI/Query/TextQuery.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/TextQuery.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -19,5 +19,5 @@
 class TextDialog::AtomTextQuery : public Dialog::AtomQuery {
 public:
-  AtomTextQuery(std::string title, std::string _description = NULL);
+  AtomTextQuery(Parameter<const atom *> &, std::string title, std::string _description = NULL);
   virtual ~AtomTextQuery();
   virtual bool handle();
@@ -26,5 +26,5 @@
 class TextDialog::AtomsTextQuery : public Dialog::AtomsQuery {
 public:
-  AtomsTextQuery(std::string title, std::string _description = NULL);
+  AtomsTextQuery(Parameter<std::vector<const atom *> > &, std::string title, std::string _description = NULL);
   virtual ~AtomsTextQuery();
   virtual bool handle();
@@ -33,13 +33,13 @@
 class TextDialog::BooleanTextQuery : public Dialog::BooleanQuery {
 public:
-  BooleanTextQuery(std::string title, std::string _description = NULL);
+  BooleanTextQuery(Parameter<bool> &, std::string title, std::string _description = NULL);
   virtual ~BooleanTextQuery();
   virtual bool handle();
 };
 
-class TextDialog::BoxTextQuery : public Dialog::BoxQuery {
+class TextDialog::RealSpaceMatrixTextQuery : public Dialog::RealSpaceMatrixQuery {
 public:
-  BoxTextQuery(std::string title, std::string _description = NULL);
-  virtual ~BoxTextQuery();
+  RealSpaceMatrixTextQuery(Parameter<RealSpaceMatrix> &, std::string title, std::string _description = NULL);
+  virtual ~RealSpaceMatrixTextQuery();
   virtual bool handle();
 };
@@ -47,5 +47,5 @@
 class TextDialog::DoubleTextQuery : public Dialog::DoubleQuery {
 public:
-  DoubleTextQuery(std::string title, std::string _description = NULL);
+  DoubleTextQuery(Parameter<double> &, std::string title, std::string _description = NULL);
   virtual ~DoubleTextQuery();
   virtual bool handle();
@@ -54,5 +54,5 @@
 class TextDialog::DoublesTextQuery : public Dialog::DoublesQuery {
 public:
-  DoublesTextQuery(std::string title, std::string _description = NULL);
+  DoublesTextQuery(Parameter<std::vector<double> > &, std::string title, std::string _description = NULL);
   virtual ~DoublesTextQuery();
   virtual bool handle();
@@ -61,5 +61,5 @@
 class TextDialog::ElementTextQuery : public Dialog::ElementQuery {
 public:
-  ElementTextQuery(std::string title, std::string _description = NULL);
+  ElementTextQuery(Parameter<const element *> &, std::string title, std::string _description = NULL);
   virtual ~ElementTextQuery();
   virtual bool handle();
@@ -68,5 +68,5 @@
 class TextDialog::ElementsTextQuery : public Dialog::ElementsQuery {
 public:
-  ElementsTextQuery(std::string title, std::string _description = NULL);
+  ElementsTextQuery(Parameter<std::vector<const element *> > &, std::string title, std::string _description = NULL);
   virtual ~ElementsTextQuery();
   virtual bool handle();
@@ -82,5 +82,5 @@
 class TextDialog::FileTextQuery : public Dialog::FileQuery {
 public:
-  FileTextQuery(std::string title, std::string _description = NULL);
+  FileTextQuery(Parameter<boost::filesystem::path> &, std::string title, std::string _description = NULL);
   virtual ~FileTextQuery();
   virtual bool handle();
@@ -89,5 +89,5 @@
 class TextDialog::FilesTextQuery : public Dialog::FilesQuery {
 public:
-  FilesTextQuery(std::string title, std::string _description = NULL);
+  FilesTextQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string title, std::string _description = NULL);
   virtual ~FilesTextQuery();
   virtual bool handle();
@@ -96,5 +96,5 @@
 class TextDialog::IntTextQuery : public Dialog::IntQuery {
 public:
-  IntTextQuery(std::string title, std::string _description = NULL);
+  IntTextQuery(Parameter<int> &, std::string title, std::string _description = NULL);
   virtual ~IntTextQuery();
   virtual bool handle();
@@ -103,5 +103,5 @@
 class TextDialog::IntsTextQuery : public Dialog::IntsQuery {
 public:
-  IntsTextQuery(std::string title, std::string _description = NULL);
+  IntsTextQuery(Parameter<std::vector<int> > &, std::string title, std::string _description = NULL);
   virtual ~IntsTextQuery();
   virtual bool handle();
@@ -110,5 +110,5 @@
 class TextDialog::MoleculeTextQuery : public Dialog::MoleculeQuery {
 public:
-  MoleculeTextQuery(std::string title, std::string _description = NULL);
+  MoleculeTextQuery(Parameter<const molecule *> &, std::string title, std::string _description = NULL);
   virtual ~MoleculeTextQuery();
   virtual bool handle();
@@ -117,5 +117,5 @@
 class TextDialog::MoleculesTextQuery : public Dialog::MoleculesQuery {
 public:
-  MoleculesTextQuery(std::string title, std::string _description = NULL);
+  MoleculesTextQuery(Parameter<std::vector<const molecule *> > &, std::string title, std::string _description = NULL);
   virtual ~MoleculesTextQuery();
   virtual bool handle();
@@ -124,5 +124,5 @@
 class TextDialog::StringTextQuery : public Dialog::StringQuery {
 public:
-  StringTextQuery(std::string title, std::string _description = NULL);
+  StringTextQuery(Parameter<std::string> &, std::string title, std::string _description = NULL);
   virtual ~StringTextQuery();
   virtual bool handle();
@@ -131,5 +131,5 @@
 class TextDialog::StringsTextQuery : public Dialog::StringsQuery {
 public:
-  StringsTextQuery(std::string title, std::string _description = NULL);
+  StringsTextQuery(Parameter<std::vector<std::string> > &, std::string title, std::string _description = NULL);
   virtual ~StringsTextQuery();
   virtual bool handle();
@@ -138,5 +138,5 @@
 class TextDialog::UnsignedIntTextQuery : public Dialog::UnsignedIntQuery {
 public:
-  UnsignedIntTextQuery(std::string title, std::string _description = NULL);
+  UnsignedIntTextQuery(Parameter<unsigned int> &, std::string title, std::string _description = NULL);
   virtual ~UnsignedIntTextQuery();
   virtual bool handle();
@@ -145,5 +145,5 @@
 class TextDialog::UnsignedIntsTextQuery : public Dialog::UnsignedIntsQuery {
 public:
-  UnsignedIntsTextQuery(std::string title, std::string _description = NULL);
+  UnsignedIntsTextQuery(Parameter<std::vector<unsigned int> > &, std::string title, std::string _description = NULL);
   virtual ~UnsignedIntsTextQuery();
   virtual bool handle();
@@ -152,5 +152,5 @@
 class TextDialog::VectorTextQuery : public Dialog::VectorQuery {
 public:
-  VectorTextQuery(std::string title,bool _check, std::string _description = NULL);
+  VectorTextQuery(Parameter<Vector> &, std::string title,bool _check, std::string _description = NULL);
   virtual ~VectorTextQuery();
   virtual bool handle();
@@ -159,5 +159,5 @@
 class TextDialog::VectorsTextQuery : public Dialog::VectorsQuery {
 public:
-  VectorsTextQuery(std::string title,bool _check, std::string _description = NULL);
+  VectorsTextQuery(Parameter<std::vector<Vector> > &, std::string title,bool _check, std::string _description = NULL);
   virtual ~VectorsTextQuery();
   virtual bool handle();
@@ -166,5 +166,5 @@
 class TextDialog::RandomNumberDistribution_ParametersTextQuery : public Dialog::RandomNumberDistribution_ParametersQuery {
 public:
-  RandomNumberDistribution_ParametersTextQuery(std::string title, std::string _description = NULL);
+  RandomNumberDistribution_ParametersTextQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title, std::string _description = NULL);
   virtual ~RandomNumberDistribution_ParametersTextQuery();
   virtual bool handle();
Index: src/UIElements/TextUI/Query/UnsignedIntTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/UnsignedIntTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/UnsignedIntTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,6 +28,6 @@
 
 
-TextDialog::UnsignedIntTextQuery::UnsignedIntTextQuery(std::string title, std::string _description) :
-    Dialog::UnsignedIntQuery(title,_description)
+TextDialog::UnsignedIntTextQuery::UnsignedIntTextQuery(Parameter<unsigned int> &param, std::string title, std::string _description) :
+    Dialog::UnsignedIntQuery(param, title,_description)
 {}
 
@@ -39,5 +39,6 @@
     badInput = false;
     std::cout << getDescription() << ": ";
-    std::cin >> tmp;
+    unsigned int temp_uint;
+    std::cin >> temp_uint;
     if(std::cin.fail()){
       badInput=true;
@@ -46,4 +47,5 @@
       std::cout << "Input was not a number!" << std::endl;
     }
+    tmp.set(temp_uint);
   } while(badInput);
   // clear the input buffer of anything still in the line
Index: src/UIElements/TextUI/Query/UnsignedIntsTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/UnsignedIntsTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/UnsignedIntsTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -28,6 +28,6 @@
 
 
-TextDialog::UnsignedIntsTextQuery::UnsignedIntsTextQuery(std::string title, std::string _description) :
-    Dialog::UnsignedIntsQuery(title,_description)
+TextDialog::UnsignedIntsTextQuery::UnsignedIntsTextQuery(Parameter<std::vector<unsigned int> > &param, std::string title, std::string _description) :
+    Dialog::UnsignedIntsQuery(param, title,_description)
 {}
 
@@ -39,4 +39,5 @@
   getline(std::cin,line);
   // dissect by " "
+  std::vector<unsigned int> temp_uints;
   std::string::iterator olditer = line.begin();
   for(std::string::iterator iter = line.begin(); iter != line.end(); ++iter) {
@@ -44,5 +45,5 @@
       std::istringstream stream(std::string(iter, olditer));
       stream >> temp;
-      tmp.push_back(temp);
+      temp_uints.push_back(temp);
       olditer = iter;
     }
@@ -51,6 +52,7 @@
     std::istringstream stream(std::string(olditer, line.end()));
     stream >> temp;
-    tmp.push_back(temp);
+    temp_uints.push_back(temp);
   }
+  tmp.set(temp_uints);
 
   return true;
Index: src/UIElements/TextUI/Query/VectorTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/VectorTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/VectorTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 
 
-TextDialog::VectorTextQuery::VectorTextQuery(std::string title, bool _check, std::string _description) :
-    Dialog::VectorQuery(title,_check,_description)
+TextDialog::VectorTextQuery::VectorTextQuery(Parameter<Vector> &param, std::string title, bool _check, std::string _description) :
+    Dialog::VectorQuery(param, title,_check,_description)
 {}
 
@@ -48,4 +48,6 @@
   getline(std::cin,line);
 
+  Vector temp_vector;
+
   // dissect by ","
   double coord = 0.;
@@ -56,5 +58,5 @@
       std::istringstream stream(std::string(iter, olditer));
       stream >> coord;
-      tmp[counter++] = coord;
+      temp_vector[counter++] = coord;
       olditer = iter;
     }
@@ -63,9 +65,10 @@
     std::istringstream stream(std::string(olditer, line.end()));
     stream >> coord;
-    tmp[counter++] = coord;
+    temp_vector[counter++] = coord;
   }
+  tmp.set(temp_vector);
 
   // check vector
-  return World::getInstance().getDomain().isValid(tmp);
+  return World::getInstance().getDomain().isValid(temp_vector);
 }
 
Index: src/UIElements/TextUI/Query/VectorsTextQuery.cpp
===================================================================
--- src/UIElements/TextUI/Query/VectorsTextQuery.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/Query/VectorsTextQuery.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -31,6 +31,6 @@
 
 
-TextDialog::VectorsTextQuery::VectorsTextQuery(std::string title, bool _check, std::string _description) :
-    Dialog::VectorsQuery(title,_check,_description)
+TextDialog::VectorsTextQuery::VectorsTextQuery(Parameter<std::vector<Vector> > &param, std::string title, bool _check, std::string _description) :
+    Dialog::VectorsQuery(param, title,_check,_description)
 {}
 
@@ -50,4 +50,5 @@
   // dissect by ","
   double coord = 0.;
+  std::vector<Vector> temp_vectors;
   std::string::iterator olditerspace = line.begin();
   std::string::iterator olditercomma = line.begin();
@@ -72,8 +73,9 @@
       }
       if (World::getInstance().getDomain().isValid(temp))
-        tmp.push_back(temp);
+        temp_vectors.push_back(temp);
       olditerspace = vectoriter;
     }
   }
+  tmp.set(temp_vectors);
 
   return true;
Index: src/UIElements/TextUI/TextDialog.cpp
===================================================================
--- src/UIElements/TextUI/TextDialog.cpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/TextDialog.cpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -38,86 +38,86 @@
 }
 
-void TextDialog::queryBoolean(const char* title, std::string description){
-  registerQuery(new BooleanTextQuery(title,description));
+void TextDialog::queryBoolean(Parameter<bool> &param, const char* title, std::string description){
+  registerQuery(new BooleanTextQuery(param, title,description));
 }
 
-void TextDialog::queryInt(const char* title, std::string description){
-  registerQuery(new IntTextQuery(title,description));
+void TextDialog::queryInt(Parameter<int> &param, const char* title, std::string description){
+  registerQuery(new IntTextQuery(param, title,description));
 }
 
-void TextDialog::queryInts(const char* title, std::string description){
-  registerQuery(new IntsTextQuery(title,description));
+void TextDialog::queryInts(Parameter<std::vector<int> > &param, const char* title, std::string description){
+  registerQuery(new IntsTextQuery(param, title,description));
 }
 
-void TextDialog::queryUnsignedInt(const char* title, std::string description){
-  registerQuery(new UnsignedIntTextQuery(title,description));
+void TextDialog::queryUnsignedInt(Parameter<unsigned int> &param, const char* title, std::string description){
+  registerQuery(new UnsignedIntTextQuery(param, title,description));
 }
 
-void TextDialog::queryUnsignedInts(const char* title, std::string description){
-  registerQuery(new UnsignedIntsTextQuery(title,description));
+void TextDialog::queryUnsignedInts(Parameter<std::vector<unsigned int> > &param, const char* title, std::string description){
+  registerQuery(new UnsignedIntsTextQuery(param, title,description));
 }
 
-void TextDialog::queryDouble(const char* title, std::string description){
-  registerQuery(new DoubleTextQuery(title,description));
+void TextDialog::queryDouble(Parameter<double> &param, const char* title, std::string description){
+  registerQuery(new DoubleTextQuery(param, title,description));
 }
 
-void TextDialog::queryDoubles(const char* title, std::string description){
-  registerQuery(new DoublesTextQuery(title,description));
+void TextDialog::queryDoubles(Parameter<std::vector<double> > &param, const char* title, std::string description){
+  registerQuery(new DoublesTextQuery(param, title,description));
 }
 
-void TextDialog::queryString(const char* title, std::string description){
-  registerQuery(new StringTextQuery(title,description));
+void TextDialog::queryString(Parameter<std::string> &param, const char* title, std::string description){
+  registerQuery(new StringTextQuery(param, title,description));
 }
 
-void TextDialog::queryStrings(const char* title, std::string description){
-  registerQuery(new StringsTextQuery(title,description));
+void TextDialog::queryStrings(Parameter<std::vector<std::string> > &param, const char* title, std::string description){
+  registerQuery(new StringsTextQuery(param, title,description));
 }
 
-void TextDialog::queryAtom(const char* title, std::string description) {
-  registerQuery(new AtomTextQuery(title,description));
+void TextDialog::queryAtom(Parameter<const atom *> &param, const char* title, std::string description) {
+  registerQuery(new AtomTextQuery(param, title,description));
 }
 
-void TextDialog::queryAtoms(const char* title, std::string description) {
-  registerQuery(new AtomsTextQuery(title,description));
+void TextDialog::queryAtoms(Parameter<std::vector<const atom *> > &param, const char* title, std::string description) {
+  registerQuery(new AtomsTextQuery(param, title,description));
 }
 
-void TextDialog::queryMolecule(const char* title, std::string description) {
-  registerQuery(new MoleculeTextQuery(title,description));
+void TextDialog::queryMolecule(Parameter<const molecule *> &param, const char* title, std::string description) {
+  registerQuery(new MoleculeTextQuery(param, title,description));
 }
 
-void TextDialog::queryMolecules(const char* title, std::string description) {
-  registerQuery(new MoleculesTextQuery(title,description));
+void TextDialog::queryMolecules(Parameter<std::vector<const molecule *> > &param, const char* title, std::string description) {
+  registerQuery(new MoleculesTextQuery(param, title,description));
 }
 
-void TextDialog::queryVector(const char* title, bool check, std::string description) {
-  registerQuery(new VectorTextQuery(title,check,description));
+void TextDialog::queryVector(Parameter<Vector> &param, const char* title, bool check, std::string description) {
+  registerQuery(new VectorTextQuery(param, title,check,description));
 }
 
-void TextDialog::queryVectors(const char* title, bool check, std::string description) {
-  registerQuery(new VectorsTextQuery(title,check,description));
+void TextDialog::queryVectors(Parameter<std::vector<Vector> > &param, const char* title, bool check, std::string description) {
+  registerQuery(new VectorsTextQuery(param, title,check,description));
 }
 
-void TextDialog::queryBox(const char* title, std::string description) {
-  registerQuery(new BoxTextQuery(title,description));
+void TextDialog::queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &param, const char* title, std::string description) {
+  registerQuery(new RealSpaceMatrixTextQuery(param, title,description));
 }
 
-void TextDialog::queryElement(const char* title, std::string description){
-  registerQuery(new ElementTextQuery(title,description));
+void TextDialog::queryElement(Parameter<const element *> &param, const char* title, std::string description){
+  registerQuery(new ElementTextQuery(param, title,description));
 }
 
-void TextDialog::queryElements(const char* title, std::string description){
-  registerQuery(new ElementsTextQuery(title,description));
+void TextDialog::queryElements(Parameter<std::vector<const element *> > &param, const char* title, std::string description){
+  registerQuery(new ElementsTextQuery(param, title,description));
 }
 
-void TextDialog::queryFile(const char* title, std::string description){
-  registerQuery(new FileTextQuery(title,description));
+void TextDialog::queryFile(Parameter<boost::filesystem::path> &param, const char* title, std::string description){
+  registerQuery(new FileTextQuery(param, title,description));
 }
 
-void TextDialog::queryFiles(const char* title, std::string description){
-  registerQuery(new FilesTextQuery(title,description));
+void TextDialog::queryFiles(Parameter<std::vector< boost::filesystem::path> > &param, const char* title, std::string description){
+  registerQuery(new FilesTextQuery(param, title,description));
 }
 
-void TextDialog::queryRandomNumberDistribution_Parameters(const char* title, std::string description){
-  registerQuery(new RandomNumberDistribution_ParametersTextQuery(title,description));
+void TextDialog::queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> &param, const char* title, std::string description){
+  registerQuery(new RandomNumberDistribution_ParametersTextQuery(param, title,description));
 }
 
Index: src/UIElements/TextUI/TextDialog.hpp
===================================================================
--- src/UIElements/TextUI/TextDialog.hpp	(revision 004d5c87ea6293a9829cd1f88041c885baa3bb18)
+++ src/UIElements/TextUI/TextDialog.hpp	(revision bd81f9550d144dc810bf910fa44f3c8249361651)
@@ -22,4 +22,5 @@
 class element;
 class molecule;
+class RealSpaceMatrix;
 class Vector;
 
@@ -31,25 +32,25 @@
 
   virtual void queryEmpty(const char *, std::string = "");
-  virtual void queryBoolean(const char *, std::string = "");
-  virtual void queryInt(const char *, std::string = "");
-  virtual void queryInts(const char *, std::string = "");
-  virtual void queryUnsignedInt(const char *, std::string = "");
-  virtual void queryUnsignedInts(const char *, std::string = "");
-  virtual void queryString(const char*, std::string = "");
-  virtual void queryStrings(const char*, std::string = "");
-  virtual void queryDouble(const char*, std::string = "");
-  virtual void queryDoubles(const char*, std::string = "");
-  virtual void queryAtom(const char*,std::string = "");
-  virtual void queryAtoms(const char*,std::string = "");
-  virtual void queryMolecule(const char*,std::string = "");
-  virtual void queryMolecules(const char*,std::string = "");
-  virtual void queryVector(const char*,bool, std::string = "");
-  virtual void queryVectors(const char*,bool, std::string = "");
-  virtual void queryBox(const char*, std::string = "");
-  virtual void queryElement(const char*, std::string = "");
-  virtual void queryElements(const char*, std::string = "");
-  virtual void queryFile(const char*, std::string = "");
-  virtual void queryFiles(const char*, std::string = "");
-  virtual void queryRandomNumberDistribution_Parameters(const char*, std::string = "");
+  virtual void queryBoolean(Parameter<bool> &, const char *, std::string = "");
+  virtual void queryInt(Parameter<int> &, const char *, std::string = "");
+  virtual void queryInts(Parameter<std::vector<int> > &, const char *, std::string = "");
+  virtual void queryUnsignedInt(Parameter<unsigned int> &, const char *, std::string = "");
+  virtual void queryUnsignedInts(Parameter<std::vector<unsigned int> > &, const char *, std::string = "");
+  virtual void queryString(Parameter<std::string> &, const char*, std::string = "");
+  virtual void queryStrings(Parameter<std::vector<std::string> > &, const char*, std::string = "");
+  virtual void queryDouble(Parameter<double> &, const char*, std::string = "");
+  virtual void queryDoubles(Parameter<std::vector<double> > &, const char*, std::string = "");
+  virtual void queryAtom(Parameter<const atom *> &, const char*,std::string = "");
+  virtual void queryAtoms(Parameter<std::vector<const atom *> > &, const char*,std::string = "");
+  virtual void queryMolecule(Parameter<const molecule *> &, const char*,std::string = "");
+  virtual void queryMolecules(Parameter<std::vector<const molecule *> > &, const char*,std::string = "");
+  virtual void queryVector(Parameter<Vector> &, const char*,bool, std::string = "");
+  virtual void queryVectors(Parameter<std::vector<Vector> > &, const char*,bool, std::string = "");
+  virtual void queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &, const char*, std::string = "");
+  virtual void queryElement(Parameter<const element *> &, const char*, std::string = "");
+  virtual void queryElements(Parameter<std::vector<const element *> > &, const char*, std::string = "");
+  virtual void queryFile(Parameter<boost::filesystem::path> &, const char*, std::string = "");
+  virtual void queryFiles(Parameter<std::vector<boost::filesystem::path> > &, const char*, std::string = "");
+  virtual void queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> &, const char*, std::string = "");
 
 protected:
@@ -60,5 +61,4 @@
   class AtomsTextQuery;
   class BooleanTextQuery;
-  class BoxTextQuery;
   class DoubleTextQuery;
   class DoublesTextQuery;
@@ -72,4 +72,5 @@
   class MoleculeTextQuery;
   class MoleculesTextQuery;
+  class RealSpaceMatrixTextQuery;
   class StringTextQuery;
   class StringsTextQuery;
