Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java	(revision 16744)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/CzechAddressPlugin.java	(revision 16750)
@@ -147,5 +147,5 @@
                 reasoner.update(street);
 
-            for (OsmPrimitive prim : Main.ds.allPrimitives()) {
+            for (OsmPrimitive prim : Main.main.getCurrentDataSet().allPrimitives()) {
                 if (House.isMatchable(prim) || Street.isMatchable(prim))
                     reasoner.update(prim);
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/MapUtils.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/MapUtils.java	(revision 16744)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/MapUtils.java	(revision 16750)
@@ -22,5 +22,5 @@
      */
     public static void zoomToMany(Collection<OsmPrimitive> primitives) {
-        Main.ds.setSelected(primitives);
+        Main.main.getCurrentDataSet().setSelected(primitives);
         (new AutoScaleAction("selection")).actionPerformed(null);
     }
@@ -30,5 +30,5 @@
      */
     public static void zoomTo(OsmPrimitive primitive) {
-        Main.ds.setSelected(primitive);
+        Main.main.getCurrentDataSet().setSelected(primitive);
         (new AutoScaleAction("selection")).actionPerformed(null);
     }
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/FactoryAction.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/FactoryAction.java	(revision 16744)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/FactoryAction.java	(revision 16750)
@@ -107,6 +107,6 @@
         FactoryDialog.getInstance().selectionListenerActivated = false;
         FactoryDialog.getInstance().selectNextUnmatchedHouseByCheckBox();
-        Main.ds.addPrimitive(newNode);
-        Main.ds.setSelected(newNode);
+        Main.main.getCurrentDataSet().addPrimitive(newNode);
+        Main.main.getCurrentDataSet().setSelected(newNode);
         FactoryDialog.getInstance().selectionListenerActivated = true;
     }
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/PointManipulatorAction.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/PointManipulatorAction.java	(revision 16744)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/PointManipulatorAction.java	(revision 16750)
@@ -43,5 +43,5 @@
      */
     public void actionPerformed(ActionEvent e) {
-        Collection<OsmPrimitive> data = Main.ds.getSelected();
+        Collection<OsmPrimitive> data = Main.main.getCurrentDataSet().getSelected();
 
         if (data.size() != 1) return;
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/SplitAreaByEmptyWayAction.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/SplitAreaByEmptyWayAction.java	(revision 16744)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/actions/SplitAreaByEmptyWayAction.java	(revision 16750)
@@ -51,6 +51,6 @@
     public void actionPerformed(ActionEvent e) {
 
-        Collection<OsmPrimitive> selectedWays = Main.ds.getSelectedWays();
-        Collection<OsmPrimitive> newSelection = Main.ds.getSelected();
+        Collection<OsmPrimitive> selectedWays = Main.main.getCurrentDataSet().getSelectedWays();
+        Collection<OsmPrimitive> newSelection = Main.main.getCurrentDataSet().getSelected();
 
         for (OsmPrimitive prim : selectedWays) {
@@ -58,5 +58,5 @@
                 Way area = (Way) prim;
 
-            for (OsmPrimitive prim2 : Main.ds.allNonDeletedPrimitives()) {
+            for (OsmPrimitive prim2 : Main.main.getCurrentDataSet().allNonDeletedPrimitives()) {
                 if (!(prim2 instanceof Way)) continue;
                 if (prim2.equals(prim))      continue;
@@ -80,6 +80,6 @@
 
                 if (errorCode == 0) {
-                    Main.ds.addPrimitive(newArea1);
-                    Main.ds.addPrimitive(newArea2);
+                    Main.main.getCurrentDataSet().addPrimitive(newArea1);
+                    Main.main.getCurrentDataSet().addPrimitive(newArea2);
 
                     area.delete(true);
@@ -96,5 +96,5 @@
         }
 
-        Main.ds.setSelected(newSelection);
+        Main.main.getCurrentDataSet().setSelected(newSelection);
     }
 
@@ -124,5 +124,5 @@
         }
 
-        for (Relation relation : Main.ds.relations)
+        for (Relation relation : Main.main.getCurrentDataSet().relations)
             for (RelationMember areaMember : relation.members)
                 if (area.equals(areaMember.member))
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java	(revision 16744)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/LocationSelector.java	(revision 16750)
@@ -83,5 +83,5 @@
 
         BoundingXYVisitor visitor = new BoundingXYVisitor();
-        for (OsmPrimitive op : Main.ds.allPrimitives()) {
+        for (OsmPrimitive op : Main.main.getCurrentDataSet().allPrimitives()) {
             if (op instanceof Node) {
                 ((Node) op).visit(visitor);
@@ -103,5 +103,5 @@
             System.out.println("AUTO: Center is " + center);
 
-        for (OsmPrimitive op : Main.ds.allPrimitives()) {
+        for (OsmPrimitive op : Main.main.getCurrentDataSet().allPrimitives()) {
 
             if (!(op instanceof Node)) {
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.java	(revision 16744)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/ManagerDialog.java	(revision 16750)
@@ -47,5 +47,5 @@
 
         Capitalizator cap = new Capitalizator(
-                                Main.ds.allPrimitives(),
+                                Main.main.getCurrentDataSet().allPrimitives(),
                                 CzechAddressPlugin.getLocation().getStreets());
 
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.java	(revision 16744)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/gui/PointManipulatorDialog.java	(revision 16750)
@@ -99,6 +99,6 @@
             proposalContainer.applyAll();
 
-            Main.ds.setSelected((Node) null); // TODO: This is an ugly hack.
-            Main.ds.setSelected(proposalContainer.getTarget());
+            Main.main.getCurrentDataSet().setSelected((Node) null); // TODO: This is an ugly hack.
+            Main.main.getCurrentDataSet().setSelected(proposalContainer.getTarget());
 
             AddressElement elem = (AddressElement) matchesComboBox.getSelectedItem();
Index: applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ExtractAddressIntoNodeProposal.java
===================================================================
--- applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ExtractAddressIntoNodeProposal.java	(revision 16744)
+++ applications/editors/josm/plugins/czechaddress/src/org/openstreetmap/josm/plugins/czechaddress/proposal/ExtractAddressIntoNodeProposal.java	(revision 16750)
@@ -66,5 +66,5 @@
            way.remove(key);
 
-        Main.ds.addPrimitive(addrNode);
+        Main.main.getCurrentDataSet().addPrimitive(addrNode);
     }
 
