Index: applications/editors/josm/plugins/indoorhelper/build.xml
===================================================================
--- applications/editors/josm/plugins/indoorhelper/build.xml	(revision 34521)
+++ applications/editors/josm/plugins/indoorhelper/build.xml	(revision 34522)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="Inital commit"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="13265"/>
+    <property name="plugin.main.version" value="14153"/>
 
     <!-- Configure these properties (replace "..." accordingly).
Index: applications/editors/josm/plugins/indoorhelper/src/controller/IndoorHelperController.java
===================================================================
--- applications/editors/josm/plugins/indoorhelper/src/controller/IndoorHelperController.java	(revision 34521)
+++ applications/editors/josm/plugins/indoorhelper/src/controller/IndoorHelperController.java	(revision 34522)
@@ -40,8 +40,9 @@
 import javax.swing.JOptionPane;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.ValidateAction;
 import org.openstreetmap.josm.actions.mapmode.DrawAction;
 import org.openstreetmap.josm.actions.mapmode.SelectAction;
+import org.openstreetmap.josm.data.Preferences;
+import org.openstreetmap.josm.data.osm.OsmDataManager;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Tag;
@@ -52,4 +53,5 @@
 import org.openstreetmap.josm.gui.help.HelpBrowser;
 import org.openstreetmap.josm.gui.mappaint.MapPaintStyles;
+import org.openstreetmap.josm.spi.preferences.Config;
 import org.openstreetmap.josm.spi.preferences.MapListSetting;
 import org.openstreetmap.josm.spi.preferences.Setting;
@@ -572,5 +574,5 @@
    public void unsetSpecificKeyFilter(String key) {
 
-     Collection<OsmPrimitive> p = Main.main.getEditDataSet().allPrimitives();
+     Collection<OsmPrimitive> p = OsmDataManager.getInstance().getEditDataSet().allPrimitives();
      int level = Integer.parseInt(levelValue);
 
@@ -623,5 +625,5 @@
      */
     private void updateSettings() {
-        Main.pref.init(false);
+        Preferences.main().init(false);
         MapCSSTagChecker tagChecker = OsmValidator.getTest(MapCSSTagChecker.class);
             if (tagChecker != null) {
@@ -638,5 +640,5 @@
      */
     private void setPluginPreferences(boolean enabled) {
-       Map<String, Setting<?>> settings = Main.pref.getAllSettings();
+       Map<String, Setting<?>> settings = Preferences.main().getAllSettings();
 
        MapListSetting validatorMapListSetting = (MapListSetting) settings.
@@ -672,9 +674,9 @@
            indoorValidator.put("title", "Indoor");
            indoorValidator.put("active", "true");
-           indoorValidator.put("url", Main.pref.getDirs().getUserDataDirectory(true)+ sep +"validator" +
+           indoorValidator.put("url", Config.getDirs().getUserDataDirectory(true)+ sep +"validator" +
                    sep + "indoorhelper.validator.mapcss");
 
            validatorMapsNew.add(indoorValidator);
-           Main.pref.putListOfMaps("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",
+           Config.getPref().putListOfMaps("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",
                    validatorMapsNew);
 
@@ -695,8 +697,8 @@
            indoorMapPaint.put("title", tr("Indoor"));
            indoorMapPaint.put("active", "true");
-           indoorMapPaint.put("url", Main.pref.getDirs().getUserDataDirectory(true) + sep + "styles"
+           indoorMapPaint.put("url", Config.getDirs().getUserDataDirectory(true) + sep + "styles"
                    + sep + "sit.mapcss");
            styleMapsNew.add(indoorMapPaint);
-           Main.pref.putListOfMaps("mappaint.style.entries", styleMapsNew);
+           Config.getPref().putListOfMaps("mappaint.style.entries", styleMapsNew);
 
            updateSettings();
@@ -719,9 +721,9 @@
            indoorValidator.put("title", tr("Indoor"));
            indoorValidator.put("active", "false");
-           indoorValidator.put("url", Main.pref.getDirs().getUserDataDirectory(true)+ sep +"validator" +
+           indoorValidator.put("url", Config.getDirs().getUserDataDirectory(true)+ sep +"validator" +
                    sep + "indoorhelper.validator.mapcss");
 
            validatorMapsNew.add(indoorValidator);
-           Main.pref.putListOfMaps("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",
+           Config.getPref().putListOfMaps("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",
                    validatorMapsNew);
 
@@ -743,8 +745,8 @@
            indoorMapPaint.put("title", tr("Indoor"));
            indoorMapPaint.put("active", "false");
-           indoorMapPaint.put("url", Main.pref.getDirs().getUserDataDirectory(true) + sep + "styles"
+           indoorMapPaint.put("url", Config.getDirs().getUserDataDirectory(true) + sep + "styles"
                    + sep + "sit.mapcss");
            styleMapsNew.add(indoorMapPaint);
-           Main.pref.putListOfMaps("mappaint.style.entries", styleMapsNew);
+           Config.getPref().putListOfMaps("mappaint.style.entries", styleMapsNew);
 
            updateSettings();
Index: applications/editors/josm/plugins/indoorhelper/src/model/IndoorHelperModel.java
===================================================================
--- applications/editors/josm/plugins/indoorhelper/src/model/IndoorHelperModel.java	(revision 34521)
+++ applications/editors/josm/plugins/indoorhelper/src/model/IndoorHelperModel.java	(revision 34522)
@@ -27,8 +27,9 @@
 import javax.swing.JOptionPane;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.command.AddCommand;
 import org.openstreetmap.josm.command.ChangePropertyCommand;
+import org.openstreetmap.josm.data.UndoRedoHandler;
 import org.openstreetmap.josm.data.osm.DataSet;
+import org.openstreetmap.josm.data.osm.OsmDataManager;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Relation;
@@ -79,7 +80,8 @@
      */
     public void addTagsToOSM(IndoorObject object, List<Tag> userTags) {
-        if (!MainApplication.getLayerManager().getEditDataSet().selectionEmpty() && !Main.main.getInProgressSelection().isEmpty()) {
-
-            DataSet ds = Main.main.getEditDataSet();
+        if (!MainApplication.getLayerManager().getEditDataSet().selectionEmpty() &&
+                !OsmDataManager.getInstance().getInProgressSelection().isEmpty()) {
+
+            DataSet ds = OsmDataManager.getInstance().getEditDataSet();
             List<Tag> tags = this.getObjectTags(object);
             Collection<Relation> relations = ds.getRelations();
@@ -97,10 +99,11 @@
                 //Add tags to relation
                 for (Tag t : tags) {
-                        Main.main.undoRedo.add(new ChangePropertyCommand(relationToAdd, t.getKey(), t.getValue()));
+                        UndoRedoHandler.getInstance().add(new ChangePropertyCommand(relationToAdd, t.getKey(), t.getValue()));
                 }
             } else {
                 //Add tags to ways or nodes
                 for (Tag t : tags) {
-                    Main.main.undoRedo.add(new ChangePropertyCommand(Main.main.getInProgressSelection(), t.getKey(), t.getValue()));
+                    UndoRedoHandler.getInstance().add(new ChangePropertyCommand(
+                            OsmDataManager.getInstance().getInProgressSelection(), t.getKey(), t.getValue()));
                 }
             }
@@ -119,5 +122,6 @@
     public void addTagsToOSM(IndoorObject object) {
 
-        if (!MainApplication.getLayerManager().getEditDataSet().selectionEmpty() && !Main.main.getInProgressSelection().isEmpty()) {
+        if (!MainApplication.getLayerManager().getEditDataSet().selectionEmpty() &&
+                !OsmDataManager.getInstance().getInProgressSelection().isEmpty()) {
             List<Tag> tags = this.getObjectTags(object);
 
@@ -127,5 +131,6 @@
             //Add the tags to the current selection
             for (Tag t : tags) {
-                Main.main.undoRedo.add(new ChangePropertyCommand(Main.main.getInProgressSelection(), t.getKey(), t.getValue()));
+                UndoRedoHandler.getInstance().add(new ChangePropertyCommand(
+                        OsmDataManager.getInstance().getInProgressSelection(), t.getKey(), t.getValue()));
             }
         //If the selected dataset ist empty
@@ -143,9 +148,11 @@
     public void addTagsToOSM(List<Tag> userTags) {
 
-        if (!MainApplication.getLayerManager().getEditDataSet().selectionEmpty() && !Main.main.getInProgressSelection().isEmpty()) {
+        if (!MainApplication.getLayerManager().getEditDataSet().selectionEmpty() &&
+                !OsmDataManager.getInstance().getInProgressSelection().isEmpty()) {
 
             //Add the tags to the current selection
             for (Tag t : userTags) {
-                Main.main.undoRedo.add(new ChangePropertyCommand(Main.main.getInProgressSelection(), t.getKey(), t.getValue()));
+                UndoRedoHandler.getInstance().add(new ChangePropertyCommand(
+                        OsmDataManager.getInstance().getInProgressSelection(), t.getKey(), t.getValue()));
             }
         } else if (MainApplication.getLayerManager().getEditDataSet().selectionEmpty()) {
@@ -163,5 +170,5 @@
         Relation newRelation = new Relation();
         RelationMember newMember;
-        DataSet ds = Main.main.getEditDataSet();
+        DataSet ds = OsmDataManager.getInstance().getEditDataSet();
 
         // Create new relation and add a new member with specific role
@@ -173,5 +180,5 @@
         }
         // Add relation to OSM data
-        MainApplication.undoRedo.add(new AddCommand(MainApplication.getLayerManager().getEditDataSet(), newRelation));
+        UndoRedoHandler.getInstance().add(new AddCommand(MainApplication.getLayerManager().getEditDataSet(), newRelation));
     }
 
@@ -186,9 +193,10 @@
 
         RelationMember newMember;
-        DataSet ds = Main.main.getEditDataSet();
+        DataSet ds = OsmDataManager.getInstance().getEditDataSet();
         Collection<Relation> relations = ds.getRelations();
         Relation relation = getRelationFromDataSet(ds, relations);
 
-        if (!MainApplication.getLayerManager().getEditDataSet().selectionEmpty() && !Main.main.getInProgressSelection().isEmpty() &&
+        if (!MainApplication.getLayerManager().getEditDataSet().selectionEmpty() &&
+                !OsmDataManager.getInstance().getInProgressSelection().isEmpty() &&
                 !innerRelation.isEmpty() && getRole(ds, relations).equals("outer")) {
 
Index: applications/editors/josm/plugins/indoorhelper/src/org/openstreetmap/josm/plugins/indoorhelper/IndoorHelperPlugin.java
===================================================================
--- applications/editors/josm/plugins/indoorhelper/src/org/openstreetmap/josm/plugins/indoorhelper/IndoorHelperPlugin.java	(revision 34521)
+++ applications/editors/josm/plugins/indoorhelper/src/org/openstreetmap/josm/plugins/indoorhelper/IndoorHelperPlugin.java	(revision 34522)
@@ -26,5 +26,4 @@
 import java.io.OutputStream;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.MapFrame;
@@ -38,4 +37,5 @@
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
+import org.openstreetmap.josm.spi.preferences.Config;
 
 import controller.IndoorHelperController;
@@ -97,5 +97,5 @@
             byte[] buffer = new byte[4096];
 
-            String valDirPath = Main.pref.getDirs().getUserDataDirectory(true) + sep + "validator";
+            String valDirPath = Config.getDirs().getUserDataDirectory(true) + sep + "validator";
             File valDir = new File(valDirPath);
             valDir.mkdirs();
@@ -126,5 +126,5 @@
             byte[] buffer = new byte[4096];
 
-            String valDirPath = Main.pref.getDirs().getUserDataDirectory(true) + sep + "styles";
+            String valDirPath = Config.getDirs().getUserDataDirectory(true) + sep + "styles";
             File valDir = new File(valDirPath);
             valDir.mkdirs();
@@ -172,5 +172,5 @@
 //    private void setIndoorValidator() {
 //        //get the current validator settings
-//        Map<String, Setting<?>> settings =  Main.pref.getAllSettings();
+//        Map<String, Setting<?>> settings =  Config.getPref().getAllSettings();
 //        MapListSetting mapListSetting = (MapListSetting) settings.
 //                get("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries");
@@ -199,9 +199,9 @@
 //            indoorValidator.put("title", "Indoor");
 //            indoorValidator.put("active", "true");
-//            indoorValidator.put("url", Main.pref.getUserDataDirectory()+ sep +"validator" +
+//            indoorValidator.put("url", Config.getPref().getUserDataDirectory()+ sep +"validator" +
 //                    sep + "indoorhelper.validator.mapcss");
 //
 //            validatorMapsNew.add(indoorValidator);
-//            Main.pref.putListOfStructs
+//            Config.getPref().putListOfStructs
 //            ("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",
 //                    validatorMapsNew);
