Index: /applications/editors/josm/plugins/indoorhelper/build.xml
===================================================================
--- /applications/editors/josm/plugins/indoorhelper/build.xml	(revision 33886)
+++ /applications/editors/josm/plugins/indoorhelper/build.xml	(revision 33887)
@@ -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="10580"/>
+    <property name="plugin.main.version" value="12856"/>
 
     <!-- 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 33886)
+++ /applications/editors/josm/plugins/indoorhelper/src/controller/IndoorHelperController.java	(revision 33887)
@@ -37,4 +37,5 @@
 import org.openstreetmap.josm.data.validation.OsmValidator;
 import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.dialogs.FilterDialog;
 import org.openstreetmap.josm.gui.dialogs.FilterTableModel;
@@ -77,5 +78,5 @@
 
         addToolboxListeners();
-        Main.map.addToggleDialog(toolboxView);
+        MainApplication.getMap().addToggleDialog(toolboxView);
     }
 
@@ -142,5 +143,5 @@
 
                 // Delete the indoor filters
-                FilterDialog filterDialog = Main.map.getToggleDialog(FilterDialog.class);
+                FilterDialog filterDialog = MainApplication.getMap().getToggleDialog(FilterDialog.class);
 
                 if (filterDialog != null) {
@@ -394,9 +395,9 @@
      */
     private void setPluginPreferences(boolean enabled) {
-        Collection<Map<String, String>> validatorMaps = 
-                Main.pref.getListOfStructs("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",
+        Collection<Map<String, String>> validatorMaps =
+                Main.pref.getListOfMaps("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",
                 new ArrayList<>());
-        Collection<Map<String, String>> styleMaps = 
-                Main.pref.getListOfStructs("mappaint.style.entries", new ArrayList<>());
+        Collection<Map<String, String>> styleMaps =
+                Main.pref.getListOfMaps("mappaint.style.entries", new ArrayList<>());
 
         if (enabled) {
@@ -418,9 +419,9 @@
             indoorValidator.put("title", "Indoor");
             indoorValidator.put("active", "true");
-            indoorValidator.put("url", Main.pref.getUserDataDirectory()+ sep +"validator" +
+            indoorValidator.put("url", Main.pref.getDirs().getUserDataDirectory(false)+ sep +"validator" +
                     sep + "indoorhelper.validator.mapcss");
 
             validatorMapsNew.add(indoorValidator);
-            Main.pref.putListOfStructs("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",
+            Main.pref.putListOfMaps("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",
                     validatorMapsNew);
 
@@ -441,8 +442,8 @@
             indoorMapPaint.put("title", "Indoor");
             indoorMapPaint.put("active", "true");
-            indoorMapPaint.put("url", Main.pref.getUserDataDirectory() + sep + "styles"
+            indoorMapPaint.put("url", Main.pref.getDirs().getUserDataDirectory(false) + sep + "styles"
                     + sep + "indoor.mapcss");
             styleMapsNew.add(indoorMapPaint);
-            Main.pref.putListOfStructs("mappaint.style.entries", styleMapsNew);
+            Main.pref.putListOfMaps("mappaint.style.entries", styleMapsNew);
 
             updateSettings();
@@ -465,9 +466,9 @@
             indoorValidator.put("title", "Indoor");
             indoorValidator.put("active", "false");
-            indoorValidator.put("url", Main.pref.getUserDataDirectory()+ sep +"validator" +
+            indoorValidator.put("url", Main.pref.getDirs().getUserDataDirectory(false)+ sep +"validator" +
                     sep + "indoorhelper.validator.mapcss");
 
             validatorMapsNew.add(indoorValidator);
-            Main.pref.putListOfStructs("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",
+            Main.pref.putListOfMaps("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",
                     validatorMapsNew);
 
@@ -489,8 +490,8 @@
             indoorMapPaint.put("title", "Indoor");
             indoorMapPaint.put("active", "false");
-            indoorMapPaint.put("url", Main.pref.getUserDataDirectory() + sep + "styles"
+            indoorMapPaint.put("url", Main.pref.getDirs().getUserDataDirectory(false) + sep + "styles"
                     + sep + "indoor.mapcss");
             styleMapsNew.add(indoorMapPaint);
-            Main.pref.putListOfStructs("mappaint.style.entries", styleMapsNew);
+            Main.pref.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 33886)
+++ /applications/editors/josm/plugins/indoorhelper/src/model/IndoorHelperModel.java	(revision 33887)
@@ -29,4 +29,5 @@
 import org.openstreetmap.josm.data.osm.Filter.FilterPreferenceEntry;
 import org.openstreetmap.josm.data.osm.Tag;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.dialogs.FilterDialog;
 import org.openstreetmap.josm.gui.dialogs.FilterTableModel;
@@ -78,5 +79,5 @@
 
                 // Get the filter dialog
-                FilterDialog filterDialog = Main.map.getToggleDialog(FilterDialog.class);
+                FilterDialog filterDialog = MainApplication.getMap().getToggleDialog(FilterDialog.class);
 
                 if (filterDialog != null) {
@@ -123,5 +124,5 @@
 
             // Get the filter dialog
-            FilterDialog filterDialog = Main.map.getToggleDialog(FilterDialog.class);
+            FilterDialog filterDialog = MainApplication.getMap().getToggleDialog(FilterDialog.class);
 
             if (filterDialog != null) {
@@ -182,5 +183,5 @@
         this.workingLevel = this.getLevelNumberFromIndex(index);
 
-        FilterDialog filterDialog = Main.map.getToggleDialog(FilterDialog.class);
+        FilterDialog filterDialog = MainApplication.getMap().getToggleDialog(FilterDialog.class);
         FilterTableModel filterTableModel = filterDialog.getFilterModel();
 
@@ -258,5 +259,5 @@
      */
     public void addTagsToOSM(IndoorObject object, List<Tag> userTags) {
-        if (!Main.getLayerManager().getEditDataSet().selectionEmpty() && !Main.main.getInProgressSelection().isEmpty()) {
+        if (!MainApplication.getLayerManager().getEditDataSet().selectionEmpty() && !Main.main.getInProgressSelection().isEmpty()) {
 
             List<Tag> tags = this.getObjectTags(object);
@@ -276,5 +277,5 @@
             }
 
-        } else if (Main.getLayerManager().getEditDataSet().selectionEmpty()) {
+        } else if (MainApplication.getLayerManager().getEditDataSet().selectionEmpty()) {
 
             JOptionPane.showMessageDialog(null, "No data selected.", "Error", JOptionPane.ERROR_MESSAGE);
@@ -290,5 +291,5 @@
     public void addTagsToOSM(IndoorObject object) {
 
-        if (!Main.getLayerManager().getEditDataSet().selectionEmpty() && !Main.main.getInProgressSelection().isEmpty()) {
+        if (!MainApplication.getLayerManager().getEditDataSet().selectionEmpty() && !Main.main.getInProgressSelection().isEmpty()) {
             List<Tag> tags = this.getObjectTags(object);
             tags.add(new Tag("indoor:level", Integer.toString(workingLevel)));
@@ -301,5 +302,5 @@
                 Main.main.undoRedo.add(new ChangePropertyCommand(Main.main.getInProgressSelection(), t.getKey(), t.getValue()));
             }
-        } else if (Main.getLayerManager().getEditDataSet().selectionEmpty()) {
+        } else if (MainApplication.getLayerManager().getEditDataSet().selectionEmpty()) {
             JOptionPane.showMessageDialog(null, "No data selected.", "Error", JOptionPane.ERROR_MESSAGE);
         }
Index: /applications/editors/josm/plugins/indoorhelper/src/model/PresetCounter.java
===================================================================
--- /applications/editors/josm/plugins/indoorhelper/src/model/PresetCounter.java	(revision 33886)
+++ /applications/editors/josm/plugins/indoorhelper/src/model/PresetCounter.java	(revision 33887)
@@ -28,24 +28,24 @@
 /**
  * Counter for the calls of specific indoor objects, to track which items were used most frequently.
- * 
+ *
  * @author egru
  *
  */
 public class PresetCounter {
-    
+
     private List<IndoorObject> rankingList;
     private List<ObjectCounter> counterList;
-    
+
     /**
      * Initiates the counterList with the available IndoorObjects.
      */
-    
+
     public PresetCounter() {
         this.init();
     }
-    
+
     private void init() {
         counterList = new ArrayList<>();
-        
+
         counterList.add(new ObjectCounter(IndoorObject.CONCRETE_WALL, 0));
         counterList.add(new ObjectCounter(IndoorObject.DOOR, 0));
@@ -60,5 +60,5 @@
         counterList.add(new ObjectCounter(IndoorObject.TOILET_MALE, 0));
     }
-    
+
     /**
      * Increments the counter of a specific IndoorObject in the list.
@@ -67,54 +67,54 @@
     public void count(IndoorObject object) {
         ListIterator<ObjectCounter> iterator = this.counterList.listIterator();
-        
+
         // Go through the list and increment the corresponding objects counter value.
         while (iterator.hasNext()) {
             ObjectCounter counterTemp = iterator.next();
             if (counterTemp.getObject().equals(object)) {
-                    counterList.get(iterator.nextIndex()-1).increment();    
+                    counterList.get(iterator.nextIndex()-1).increment();
             }
         }
-        
+
         //Sort the list.
         this.sort();
     }
-    
+
     private void sort() {
         Collections.sort(counterList);
         Collections.reverse(counterList);
     }
-    
+
     public List<IndoorObject> getRanking() {
-        rankingList = new ArrayList<IndoorObject>();
-        
+        rankingList = new ArrayList<>();
+
         rankingList.add(counterList.get(0).getObject());
         rankingList.add(counterList.get(1).getObject());
         rankingList.add(counterList.get(2).getObject());
         rankingList.add(counterList.get(3).getObject());
-        
+
         return rankingList;
     }
-    
-    private class ObjectCounter implements Comparable<ObjectCounter> {
+
+    private static class ObjectCounter implements Comparable<ObjectCounter> {
         private IndoorObject object;
         private int count;
-        
+
         ObjectCounter(IndoorObject o, int c) {
             this.object = o;
             this.count = c;
         }
-        
+
         public int getCount() {
             return this.count;
         }
-        
+
         public IndoorObject getObject() {
             return this.object;
         }
-        
+
         public void increment() {
             this.count += 1;
         }
-        
+
         @Override
         public int compareTo(ObjectCounter o) {
@@ -128,9 +128,9 @@
                 return 1;
             }
-            
+
             return 0;
         }
-        
+
     }
-    
+
 }
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 33886)
+++ /applications/editors/josm/plugins/indoorhelper/src/org/openstreetmap/josm/plugins/indoorhelper/IndoorHelperPlugin.java	(revision 33887)
@@ -23,4 +23,5 @@
 import java.io.InputStream;
 import java.io.OutputStream;
+
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.MapFrame;
@@ -33,7 +34,7 @@
 /**
  * This is the main class for the indoorhelper plug-in.
- * 
+ *
  * @author egru
- * 
+ *
  */
 public class IndoorHelperPlugin extends Plugin {
@@ -46,11 +47,11 @@
     /**
      * Constructor for the plug-in.
-     * 
+     *
      * Exports the needed files and adds them to the settings.
-     * 
+     *
      * @param info general information about the plug-in
      */
     public IndoorHelperPlugin(PluginInformation info) throws Exception {
-        super(info);    
+        super(info);
 
         this.exportValidator("/data/indoorhelper.validator.mapcss");
@@ -72,5 +73,5 @@
         }
     }
-    
+
     /**
      * Exports the mapcss validator file to the preferences directory.
@@ -92,5 +93,5 @@
             byte[] buffer = new byte[4096];
 
-            String valDirPath = Main.pref.getUserDataDirectory() + sep + "validator";
+            String valDirPath = Main.pref.getDirs().getUserDataDirectory(false) + sep + "validator";
             File valDir = new File(valDirPath);
             valDir.mkdirs();
@@ -107,5 +108,5 @@
         } finally {
             stream.close();
-        }   
+        }
     }
 
@@ -128,5 +129,5 @@
             byte[] buffer = new byte[4096];
 
-            String valDirPath = Main.pref.getUserDataDirectory() + sep + "styles";
+            String valDirPath = Main.pref.getDirs().getUserDataDirectory(false) + sep + "styles";
             File valDir = new File(valDirPath);
             valDir.mkdirs();
@@ -143,7 +144,7 @@
         } finally {
             stream.close();
-        }   
+        }
     }
-    
+
     /**
      * Writes the indoor validator file in the user preferences if it isn't there
@@ -179,10 +180,10 @@
 //            indoorValidator.put("title", "Indoor");
 //            indoorValidator.put("active", "true");
-//            indoorValidator.put("url", Main.pref.getUserDataDirectory()+ sep +"validator" + 
+//            indoorValidator.put("url", Main.pref.getUserDataDirectory()+ sep +"validator" +
 //                    sep + "indoorhelper.validator.mapcss");
 //
 //            validatorMapsNew.add(indoorValidator);
 //            Main.pref.putListOfStructs
-//            ("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries", 
+//            ("validator.org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.entries",
 //                    validatorMapsNew);
 //        }
