Index: src/UIElements/Menu/MenuDescription.cpp
===================================================================
--- src/UIElements/Menu/MenuDescription.cpp	(revision e4afb4b989433224538ab4ba0f471e4573bbeaf2)
+++ src/UIElements/Menu/MenuDescription.cpp	(revision ffb9ad3ad26c892a8aa0013c675637237728b887)
@@ -13,4 +13,5 @@
  */
 
+#include <iostream>
 #include <map>
 #include <string>
@@ -24,14 +25,16 @@
 MenuDescription::MenuDescription()
 {
-  // put each menu into set
-  MenuSet.insert("analysis");
-  MenuSet.insert("atom");
-  MenuSet.insert("command");
-  MenuSet.insert("fragmentation");
-  MenuSet.insert("molecule");
-  MenuSet.insert("parser");
-  MenuSet.insert("selection");
-  MenuSet.insert("tesselation");
-  MenuSet.insert("world");
+  // put each menu into its place, "" means top level
+  MenuPositionMap["analysis"] = TopPosition("tools",1);
+  MenuPositionMap["atom"] = TopPosition("edit",1);
+  MenuPositionMap["command"] = TopPosition("",3);
+  MenuPositionMap["edit"] = TopPosition("",2);
+  MenuPositionMap["fragmentation"] = TopPosition("tools",3);
+  MenuPositionMap["molecule"] = TopPosition("edit",2);
+  MenuPositionMap["parser"] = TopPosition("edit",3);
+  MenuPositionMap["selection"] = TopPosition("edit",4);
+  MenuPositionMap["tesselation"] = TopPosition("tools",2);
+  MenuPositionMap["tools"] = TopPosition("",4);
+  MenuPositionMap["world"] = TopPosition("",1);
 
   // put menu description into each menu category
@@ -39,4 +42,5 @@
   MenuDescriptionsMap["atom"] = "Edit atoms";
   MenuDescriptionsMap["command"] = "Configuration";
+  MenuDescriptionsMap["edit"] = "Edit";
   MenuDescriptionsMap["fragmentation"] = "Fragmentation";
   MenuDescriptionsMap["molecule"] = "Parse files into system";
@@ -44,4 +48,5 @@
   MenuDescriptionsMap["selection"] = "Select atoms/molecules";
   MenuDescriptionsMap["tesselation"] = "Tesselate molecules";
+  MenuDescriptionsMap["tools"] = "Various tools";
   MenuDescriptionsMap["world"] = "Edit world";
 
@@ -49,5 +54,6 @@
   MenuNameMap["analysis"] = "Analysis";
   MenuNameMap["atom"] = "Atoms";
-  MenuNameMap["command"] = "configuration options";
+  MenuNameMap["command"] = "Configuration";
+  MenuNameMap["edit"] = "Edit";
   MenuNameMap["fragmentation"] = "Fragmentation";
   MenuNameMap["molecule"] = "Molecules";
@@ -55,4 +61,5 @@
   MenuNameMap["selection"] = "Selection";
   MenuNameMap["tesselation"] = "Tesselation";
+  MenuNameMap["tools"] = "Tools";
   MenuNameMap["world"] = "Globals";
 }
@@ -97,4 +104,5 @@
   ActionRegistry &AR = ActionRegistry::getInstance();
   for (ActionRegistry::const_iterator iter = AR.getBeginIter();iter != AR.getEndIter();++iter) {
+    std::cout << "Inserting " << (iter->second)->getName() << " into menu " << (iter->second)->Traits.getMenuName() << std::endl;
     result.insert( std::pair<std::string, std::string> ((iter->second)->Traits.getMenuName(), (iter->second)->getName()));
   }
@@ -108,5 +116,5 @@
 MenuDescription::iterator MenuDescription::getBeginIter()
 {
-  return MenuSet.begin();
+  return MenuPositionMap.begin();
 }
 
@@ -116,5 +124,5 @@
 MenuDescription::iterator MenuDescription::getEndIter()
 {
-  return MenuSet.end();
+  return MenuPositionMap.end();
 }
 
@@ -124,5 +132,5 @@
 MenuDescription::const_iterator MenuDescription::getBeginIter() const
 {
-  return MenuSet.begin();
+  return MenuPositionMap.begin();
 }
 
@@ -132,5 +140,5 @@
 MenuDescription::const_iterator MenuDescription::getEndIter() const
 {
-  return MenuSet.end();
+  return MenuPositionMap.end();
 }
 
Index: src/UIElements/Menu/MenuDescription.hpp
===================================================================
--- src/UIElements/Menu/MenuDescription.hpp	(revision e4afb4b989433224538ab4ba0f471e4573bbeaf2)
+++ src/UIElements/Menu/MenuDescription.hpp	(revision ffb9ad3ad26c892a8aa0013c675637237728b887)
@@ -25,6 +25,9 @@
   ~MenuDescription();
 
-  typedef std::set<std::string>::iterator iterator;
-  typedef std::set<std::string>::const_iterator const_iterator ;
+  typedef std::pair<std::string, int> TopPosition;
+  typedef std::map<std::string, TopPosition> IterableMap;
+  typedef IterableMap::iterator iterator;
+  typedef IterableMap::const_iterator const_iterator ;
+  typedef std::map<std::string, std::string> TextMap;
 
   // getter for description
@@ -41,7 +44,7 @@
 
 private:
-  std::set<std::string> MenuSet;
-  std::map<std::string, std::string> MenuDescriptionsMap;
-  std::map<std::string, std::string> MenuNameMap;
+  TextMap MenuDescriptionsMap;
+  IterableMap MenuPositionMap;
+  TextMap MenuNameMap;
   std::multimap <std::string, std::string> MenuItemMap;
 };
