diff --git a/relational_gui/maingui.py b/relational_gui/maingui.py
index 412d4c9..0d2aac4 100644
--- a/relational_gui/maingui.py
+++ b/relational_gui/maingui.py
@@ -2,8 +2,8 @@
 
 # Form implementation generated from reading ui file 'relational_gui/maingui.ui'
 #
-# Created: Mon Feb 13 13:21:56 2012
-#      by: PyQt4 UI code generator 4.9.1
+# Created: Sun Jun 30 11:47:05 2013
+#      by: PyQt4 UI code generator 4.10.2
 #
 # WARNING! All changes made in this file will be lost!
 
@@ -12,7 +12,16 @@ from PyQt4 import QtCore, QtGui
 try:
     _fromUtf8 = QtCore.QString.fromUtf8
 except AttributeError:
-    _fromUtf8 = lambda s: s
+    def _fromUtf8(s):
+        return s
+
+try:
+    _encoding = QtGui.QApplication.UnicodeUTF8
+    def _translate(context, text, disambig):
+        return QtGui.QApplication.translate(context, text, disambig, _encoding)
+except AttributeError:
+    def _translate(context, text, disambig):
+        return QtGui.QApplication.translate(context, text, disambig)
 
 class Ui_MainWindow(object):
     def setupUi(self, MainWindow):
@@ -212,6 +221,10 @@ class Ui_MainWindow(object):
         self.menuAbout.setObjectName(_fromUtf8("menuAbout"))
         self.action = QtGui.QAction(MainWindow)
         self.action.setObjectName(_fromUtf8("action"))
+        self.menuSession = QtGui.QMenu(self.menubar)
+        self.menuSession.setObjectName(_fromUtf8("menuSession"))
+        self.menuRelations = QtGui.QMenu(self.menubar)
+        self.menuRelations.setObjectName(_fromUtf8("menuRelations"))
         MainWindow.setMenuBar(self.menubar)
         self.actionAbout = QtGui.QAction(MainWindow)
         self.actionAbout.setMenuRole(QtGui.QAction.AboutRole)
@@ -229,15 +242,29 @@ class Ui_MainWindow(object):
         self.actionNew_relation.setObjectName(_fromUtf8("actionNew_relation"))
         self.actionEdit_relation = QtGui.QAction(MainWindow)
         self.actionEdit_relation.setObjectName(_fromUtf8("actionEdit_relation"))
-        self.menuFile.addAction(self.actionNew_relation)
-        self.menuFile.addAction(self.action_Load_relation)
-        self.menuFile.addAction(self.action_Save_relation)
-        self.menuFile.addAction(self.actionEdit_relation)
+        self.actionNew_session = QtGui.QAction(MainWindow)
+        self.actionNew_session.setObjectName(_fromUtf8("actionNew_session"))
+        self.actionSave_session_as = QtGui.QAction(MainWindow)
+        self.actionSave_session_as.setObjectName(_fromUtf8("actionSave_session_as"))
+        self.actionManage_sessions = QtGui.QAction(MainWindow)
+        self.actionManage_sessions.setObjectName(_fromUtf8("actionManage_sessions"))
+        self.actionUnload_relation = QtGui.QAction(MainWindow)
+        self.actionUnload_relation.setObjectName(_fromUtf8("actionUnload_relation"))
         self.menuFile.addSeparator()
         self.menuFile.addAction(self.action_Quit)
         self.menuAbout.addAction(self.actionAbout)
         self.menuAbout.addAction(self.actionCheck_for_new_versions)
+        self.menuSession.addAction(self.actionNew_session)
+        self.menuSession.addAction(self.actionSave_session_as)
+        self.menuSession.addAction(self.actionManage_sessions)
+        self.menuRelations.addAction(self.actionNew_relation)
+        self.menuRelations.addAction(self.action_Load_relation)
+        self.menuRelations.addAction(self.action_Save_relation)
+        self.menuRelations.addAction(self.actionEdit_relation)
+        self.menuRelations.addAction(self.actionUnload_relation)
         self.menubar.addAction(self.menuFile.menuAction())
+        self.menubar.addAction(self.menuRelations.menuAction())
+        self.menubar.addAction(self.menuSession.menuAction())
         self.menubar.addAction(self.menuAbout.menuAction())
         self.label.setBuddy(self.txtQuery)
 
@@ -280,6 +307,10 @@ class Ui_MainWindow(object):
         QtCore.QObject.connect(self.actionEdit_relation, QtCore.SIGNAL(_fromUtf8("triggered()")), MainWindow.editRelation)
         QtCore.QObject.connect(self.cmdNew, QtCore.SIGNAL(_fromUtf8("clicked()")), MainWindow.newRelation)
         QtCore.QObject.connect(self.actionNew_relation, QtCore.SIGNAL(_fromUtf8("triggered()")), MainWindow.newRelation)
+        QtCore.QObject.connect(self.actionManage_sessions, QtCore.SIGNAL(_fromUtf8("triggered()")), MainWindow.manageSessions)
+        QtCore.QObject.connect(self.actionNew_session, QtCore.SIGNAL(_fromUtf8("triggered()")), MainWindow.newSession)
+        QtCore.QObject.connect(self.actionSave_session_as, QtCore.SIGNAL(_fromUtf8("triggered()")), MainWindow.saveSessionAs)
+        QtCore.QObject.connect(self.actionUnload_relation, QtCore.SIGNAL(_fromUtf8("triggered()")), MainWindow.unloadRelation)
         QtCore.QMetaObject.connectSlotsByName(MainWindow)
         MainWindow.setTabOrder(self.cmdAbout, self.cmdSurvey)
         MainWindow.setTabOrder(self.cmdSurvey, self.cmdProduct)
@@ -311,63 +342,70 @@ class Ui_MainWindow(object):
         MainWindow.setTabOrder(self.cmdClearQuery, self.cmdExecute)
 
     def retranslateUi(self, MainWindow):
-        MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "Relational", None, QtGui.QApplication.UnicodeUTF8))
-        self.groupBox_3.setTitle(QtGui.QApplication.translate("MainWindow", "Menu", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdAbout.setText(QtGui.QApplication.translate("MainWindow", "About", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdSurvey.setText(QtGui.QApplication.translate("MainWindow", "Survey", None, QtGui.QApplication.UnicodeUTF8))
-        self.groupBox_4.setTitle(QtGui.QApplication.translate("MainWindow", "Operators", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdProduct.setToolTip(QtGui.QApplication.translate("MainWindow", "Product", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdProduct.setText(QtGui.QApplication.translate("MainWindow", "*", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdDifference.setToolTip(QtGui.QApplication.translate("MainWindow", "Difference", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdDifference.setText(QtGui.QApplication.translate("MainWindow", "-", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdUnion.setToolTip(QtGui.QApplication.translate("MainWindow", "Union", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdUnion.setText(QtGui.QApplication.translate("MainWindow", "ᑌ", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdIntersection.setToolTip(QtGui.QApplication.translate("MainWindow", "Intersection", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdIntersection.setText(QtGui.QApplication.translate("MainWindow", "ᑎ", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdDivision.setToolTip(QtGui.QApplication.translate("MainWindow", "Division", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdDivision.setText(QtGui.QApplication.translate("MainWindow", "÷", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdJoin.setToolTip(QtGui.QApplication.translate("MainWindow", "Natural join", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdJoin.setText(QtGui.QApplication.translate("MainWindow", "ᐅᐊ", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdOuterLeft.setToolTip(QtGui.QApplication.translate("MainWindow", "Left outer join", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdOuterLeft.setText(QtGui.QApplication.translate("MainWindow", "ᐅLEFTᐊ", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdOuterRight.setToolTip(QtGui.QApplication.translate("MainWindow", "Right outer join", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdOuterRight.setText(QtGui.QApplication.translate("MainWindow", "ᐅRIGHTᐊ", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdOuter.setToolTip(QtGui.QApplication.translate("MainWindow", "Full outer join", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdOuter.setText(QtGui.QApplication.translate("MainWindow", "ᐅFULLᐊ", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdProjection.setToolTip(QtGui.QApplication.translate("MainWindow", "Projection", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdProjection.setText(QtGui.QApplication.translate("MainWindow", "π", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdSelection.setToolTip(QtGui.QApplication.translate("MainWindow", "Selection", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdSelection.setText(QtGui.QApplication.translate("MainWindow", "σ", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdRename.setToolTip(QtGui.QApplication.translate("MainWindow", "Rename", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdRename.setText(QtGui.QApplication.translate("MainWindow", "ρ", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdArrow.setText(QtGui.QApplication.translate("MainWindow", "➡", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdOptimize.setText(QtGui.QApplication.translate("MainWindow", "Optimize", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdUndoOptimize.setText(QtGui.QApplication.translate("MainWindow", "Undo optimize", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdClearHistory.setText(QtGui.QApplication.translate("MainWindow", "Clear history", None, QtGui.QApplication.UnicodeUTF8))
-        self.groupBox.setTitle(QtGui.QApplication.translate("MainWindow", "Relations", None, QtGui.QApplication.UnicodeUTF8))
+        MainWindow.setWindowTitle(_translate("MainWindow", "Relational", None))
+        self.groupBox_3.setTitle(_translate("MainWindow", "Menu", None))
+        self.cmdAbout.setText(_translate("MainWindow", "About", None))
+        self.cmdSurvey.setText(_translate("MainWindow", "Survey", None))
+        self.groupBox_4.setTitle(_translate("MainWindow", "Operators", None))
+        self.cmdProduct.setToolTip(_translate("MainWindow", "Product", None))
+        self.cmdProduct.setText(_translate("MainWindow", "*", None))
+        self.cmdDifference.setToolTip(_translate("MainWindow", "Difference", None))
+        self.cmdDifference.setText(_translate("MainWindow", "-", None))
+        self.cmdUnion.setToolTip(_translate("MainWindow", "Union", None))
+        self.cmdUnion.setText(_translate("MainWindow", "ᑌ", None))
+        self.cmdIntersection.setToolTip(_translate("MainWindow", "Intersection", None))
+        self.cmdIntersection.setText(_translate("MainWindow", "ᑎ", None))
+        self.cmdDivision.setToolTip(_translate("MainWindow", "Division", None))
+        self.cmdDivision.setText(_translate("MainWindow", "÷", None))
+        self.cmdJoin.setToolTip(_translate("MainWindow", "Natural join", None))
+        self.cmdJoin.setText(_translate("MainWindow", "ᐅᐊ", None))
+        self.cmdOuterLeft.setToolTip(_translate("MainWindow", "Left outer join", None))
+        self.cmdOuterLeft.setText(_translate("MainWindow", "ᐅLEFTᐊ", None))
+        self.cmdOuterRight.setToolTip(_translate("MainWindow", "Right outer join", None))
+        self.cmdOuterRight.setText(_translate("MainWindow", "ᐅRIGHTᐊ", None))
+        self.cmdOuter.setToolTip(_translate("MainWindow", "Full outer join", None))
+        self.cmdOuter.setText(_translate("MainWindow", "ᐅFULLᐊ", None))
+        self.cmdProjection.setToolTip(_translate("MainWindow", "Projection", None))
+        self.cmdProjection.setText(_translate("MainWindow", "π", None))
+        self.cmdSelection.setToolTip(_translate("MainWindow", "Selection", None))
+        self.cmdSelection.setText(_translate("MainWindow", "σ", None))
+        self.cmdRename.setToolTip(_translate("MainWindow", "Rename", None))
+        self.cmdRename.setText(_translate("MainWindow", "ρ", None))
+        self.cmdArrow.setText(_translate("MainWindow", "➡", None))
+        self.cmdOptimize.setText(_translate("MainWindow", "Optimize", None))
+        self.cmdUndoOptimize.setText(_translate("MainWindow", "Undo optimize", None))
+        self.cmdClearHistory.setText(_translate("MainWindow", "Clear history", None))
+        self.groupBox.setTitle(_translate("MainWindow", "Relations", None))
         self.lstRelations.setSortingEnabled(True)
-        self.cmdNew.setText(QtGui.QApplication.translate("MainWindow", "New relation", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdLoad.setText(QtGui.QApplication.translate("MainWindow", "Load relation", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdSave.setText(QtGui.QApplication.translate("MainWindow", "Save relation", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdEdit.setText(QtGui.QApplication.translate("MainWindow", "Edit relation", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdUnload.setText(QtGui.QApplication.translate("MainWindow", "Unload relation", None, QtGui.QApplication.UnicodeUTF8))
-        self.groupBox_2.setTitle(QtGui.QApplication.translate("MainWindow", "Attributes", None, QtGui.QApplication.UnicodeUTF8))
-        self.txtResult.setText(QtGui.QApplication.translate("MainWindow", "_last1", None, QtGui.QApplication.UnicodeUTF8))
-        self.label.setText(QtGui.QApplication.translate("MainWindow", "=", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdClearQuery.setText(QtGui.QApplication.translate("MainWindow", "⌫", None, QtGui.QApplication.UnicodeUTF8))
-        self.cmdExecute.setText(QtGui.QApplication.translate("MainWindow", "Execute", None, QtGui.QApplication.UnicodeUTF8))
-        self.menuFile.setTitle(QtGui.QApplication.translate("MainWindow", "&File", None, QtGui.QApplication.UnicodeUTF8))
-        self.menuAbout.setTitle(QtGui.QApplication.translate("MainWindow", "&Help", None, QtGui.QApplication.UnicodeUTF8))
-        self.actionAbout.setText(QtGui.QApplication.translate("MainWindow", "&About", None, QtGui.QApplication.UnicodeUTF8))
-        self.action_Load_relation.setText(QtGui.QApplication.translate("MainWindow", "&Load relation", None, QtGui.QApplication.UnicodeUTF8))
-        self.action_Load_relation.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+O", None, QtGui.QApplication.UnicodeUTF8))
-        self.action_Save_relation.setText(QtGui.QApplication.translate("MainWindow", "&Save relation", None, QtGui.QApplication.UnicodeUTF8))
-        self.action_Save_relation.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+S", None, QtGui.QApplication.UnicodeUTF8))
-        self.action_Quit.setText(QtGui.QApplication.translate("MainWindow", "&Quit", None, QtGui.QApplication.UnicodeUTF8))
-        self.action_Quit.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+Q", None, QtGui.QApplication.UnicodeUTF8))
-        self.actionCheck_for_new_versions.setText(QtGui.QApplication.translate("MainWindow", "Check for new versions", None, QtGui.QApplication.UnicodeUTF8))
-        self.actionNew_relation.setText(QtGui.QApplication.translate("MainWindow", "New relation", None, QtGui.QApplication.UnicodeUTF8))
-        self.actionNew_relation.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+N", None, QtGui.QApplication.UnicodeUTF8))
-        self.actionEdit_relation.setText(QtGui.QApplication.translate("MainWindow", "Edit relation", None, QtGui.QApplication.UnicodeUTF8))
-        self.actionEdit_relation.setShortcut(QtGui.QApplication.translate("MainWindow", "Ctrl+E", None, QtGui.QApplication.UnicodeUTF8))
+        self.cmdNew.setText(_translate("MainWindow", "New relation", None))
+        self.cmdLoad.setText(_translate("MainWindow", "Load relation", None))
+        self.cmdSave.setText(_translate("MainWindow", "Save relation", None))
+        self.cmdEdit.setText(_translate("MainWindow", "Edit relation", None))
+        self.cmdUnload.setText(_translate("MainWindow", "Unload relation", None))
+        self.groupBox_2.setTitle(_translate("MainWindow", "Attributes", None))
+        self.txtResult.setText(_translate("MainWindow", "_last1", None))
+        self.label.setText(_translate("MainWindow", "=", None))
+        self.cmdClearQuery.setText(_translate("MainWindow", "⌫", None))
+        self.cmdExecute.setText(_translate("MainWindow", "Execute", None))
+        self.menuFile.setTitle(_translate("MainWindow", "&File", None))
+        self.menuAbout.setTitle(_translate("MainWindow", "&Help", None))
+        self.menuSession.setTitle(_translate("MainWindow", "Session", None))
+        self.menuRelations.setTitle(_translate("MainWindow", "Relations", None))
+        self.actionAbout.setText(_translate("MainWindow", "&About", None))
+        self.action_Load_relation.setText(_translate("MainWindow", "&Load relation", None))
+        self.action_Load_relation.setShortcut(_translate("MainWindow", "Ctrl+O", None))
+        self.action_Save_relation.setText(_translate("MainWindow", "&Save relation", None))
+        self.action_Save_relation.setShortcut(_translate("MainWindow", "Ctrl+S", None))
+        self.action_Quit.setText(_translate("MainWindow", "&Quit", None))
+        self.action_Quit.setShortcut(_translate("MainWindow", "Ctrl+Q", None))
+        self.actionCheck_for_new_versions.setText(_translate("MainWindow", "Check for new versions", None))
+        self.actionNew_relation.setText(_translate("MainWindow", "New relation", None))
+        self.actionNew_relation.setShortcut(_translate("MainWindow", "Ctrl+N", None))
+        self.actionEdit_relation.setText(_translate("MainWindow", "Edit relation", None))
+        self.actionEdit_relation.setShortcut(_translate("MainWindow", "Ctrl+E", None))
+        self.actionNew_session.setText(_translate("MainWindow", "New session", None))
+        self.actionSave_session_as.setText(_translate("MainWindow", "Save session as", None))
+        self.actionSave_session_as.setToolTip(_translate("MainWindow", "Save session as", None))
+        self.actionManage_sessions.setText(_translate("MainWindow", "Manage sessions", None))
+        self.actionUnload_relation.setText(_translate("MainWindow", "Unload relation", None))
 
diff --git a/relational_gui/maingui.ui b/relational_gui/maingui.ui
index c61d486..6afdbfb 100644
--- a/relational_gui/maingui.ui
+++ b/relational_gui/maingui.ui
@@ -462,10 +462,6 @@
     <property name="title">
      <string>&amp;File</string>
     </property>
-    <addaction name="actionNew_relation"/>
-    <addaction name="action_Load_relation"/>
-    <addaction name="action_Save_relation"/>
-    <addaction name="actionEdit_relation"/>
     <addaction name="separator"/>
     <addaction name="action_Quit"/>
    </widget>
@@ -477,7 +473,27 @@
     <addaction name="actionAbout"/>
     <addaction name="actionCheck_for_new_versions"/>
    </widget>
+   <widget class="QMenu" name="menuSession">
+    <property name="title">
+     <string>Session</string>
+    </property>
+    <addaction name="actionNew_session"/>
+    <addaction name="actionSave_session_as"/>
+    <addaction name="actionManage_sessions"/>
+   </widget>
+   <widget class="QMenu" name="menuRelations">
+    <property name="title">
+     <string>Relations</string>
+    </property>
+    <addaction name="actionNew_relation"/>
+    <addaction name="action_Load_relation"/>
+    <addaction name="action_Save_relation"/>
+    <addaction name="actionEdit_relation"/>
+    <addaction name="actionUnload_relation"/>
+   </widget>
    <addaction name="menuFile"/>
+   <addaction name="menuRelations"/>
+   <addaction name="menuSession"/>
    <addaction name="menuAbout"/>
   </widget>
   <action name="actionAbout">
@@ -536,6 +552,29 @@
     <string>Ctrl+E</string>
    </property>
   </action>
+  <action name="actionNew_session">
+   <property name="text">
+    <string>New session</string>
+   </property>
+  </action>
+  <action name="actionSave_session_as">
+   <property name="text">
+    <string>Save session as</string>
+   </property>
+   <property name="toolTip">
+    <string>Save session as</string>
+   </property>
+  </action>
+  <action name="actionManage_sessions">
+   <property name="text">
+    <string>Manage sessions</string>
+   </property>
+  </action>
+  <action name="actionUnload_relation">
+   <property name="text">
+    <string>Unload relation</string>
+   </property>
+  </action>
  </widget>
  <tabstops>
   <tabstop>cmdAbout</tabstop>
@@ -1178,6 +1217,70 @@
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>actionManage_sessions</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>manageSessions()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>399</x>
+     <y>305</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionNew_session</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>newSession()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>399</x>
+     <y>305</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionSave_session_as</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>saveSessionAs()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>399</x>
+     <y>305</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>actionUnload_relation</sender>
+   <signal>triggered()</signal>
+   <receiver>MainWindow</receiver>
+   <slot>unloadRelation()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>-1</x>
+     <y>-1</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>399</x>
+     <y>305</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
  <slots>
   <slot>execute()</slot>
@@ -1210,5 +1313,8 @@
   <slot>resumeHistory(QListWidgetItem*)</slot>
   <slot>editRelation()</slot>
   <slot>newRelation()</slot>
+  <slot>newSession()</slot>
+  <slot>saveSessionAs()</slot>
+  <slot>manageSessions()</slot>
  </slots>
 </ui>