Index: applications/editors/josm/plugins/ImportImagePlugin/build.xml
===================================================================
--- applications/editors/josm/plugins/ImportImagePlugin/build.xml	(revision 34445)
+++ applications/editors/josm/plugins/ImportImagePlugin/build.xml	(revision 34519)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="use consistent plugin name (don't mix up the words)" />
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="12671" />
+    <property name="plugin.main.version" value="14153" />
 
     <property name="plugin.author" value="Christoph Beekmans, Fabian Kowitz, Anna Robaszkiewicz, Oliver Kuhn, Martin Ulitzny"/>
Index: applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/ImageLayer.java
===================================================================
--- applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/ImageLayer.java	(revision 34445)
+++ applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/ImageLayer.java	(revision 34519)
@@ -27,5 +27,4 @@
 import org.opengis.referencing.NoSuchAuthorityCodeException;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.RenameLayerAction;
 import org.openstreetmap.josm.data.Bounds;
@@ -33,4 +32,5 @@
 import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
+import org.openstreetmap.josm.data.projection.ProjectionRegistry;
 import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.gui.MainApplication;
@@ -96,5 +96,5 @@
 
             // now reproject grid coverage
-            coverage = PluginOperations.reprojectCoverage(coverage, CRS.decode(Main.getProjection().toCode()));
+            coverage = PluginOperations.reprojectCoverage(coverage, CRS.decode(ProjectionRegistry.getProjection().toCode()));
 
         } catch (FactoryException e) {
@@ -105,5 +105,5 @@
                 int val = 2;
                 if (!GraphicsEnvironment.isHeadless()) {
-                    ExtendedDialog ex = new ExtendedDialog(Main.parent, tr("Warning"), 
+                    ExtendedDialog ex = new ExtendedDialog(MainApplication.getMainFrame(), tr("Warning"), 
                         new String[] {tr("Default image projection"), tr("JOSM''s current projection"), tr("Cancel")});
                     // CHECKSTYLE.OFF: LineLength
@@ -111,5 +111,5 @@
                         + "You can choose the default image projection ({0}) or JOSM''s current editor projection ({1}) as original image projection.<br>"
                         + "(It can be changed later from the right click menu of the image layer.)", 
-                        ImportImagePlugin.pluginProps.getProperty("default_crs_srid"), Main.getProjection().toCode()));
+                        ImportImagePlugin.pluginProps.getProperty("default_crs_srid"), ProjectionRegistry.getProjection().toCode()));
                     // CHECKSTYLE.ON: LineLength
                     val = ex.showDialog().getValue();
@@ -125,5 +125,5 @@
                     } else {
                         logger.debug("Passing through image un-projected.");
-                        src = CRS.decode(Main.getProjection().toCode());
+                        src = CRS.decode(ProjectionRegistry.getProjection().toCode());
                     }
                     // create a grid coverage from the image
@@ -131,5 +131,5 @@
                     this.sourceRefSys = coverage.getCoordinateReferenceSystem();
                     if (val == 1) {
-                        coverage = PluginOperations.reprojectCoverage(coverage, CRS.decode(Main.getProjection().toCode()));
+                        coverage = PluginOperations.reprojectCoverage(coverage, CRS.decode(ProjectionRegistry.getProjection().toCode()));
                     }
                 } catch (Exception e1) {
@@ -298,5 +298,5 @@
         logger.debug("resample");
         GridCoverage2D coverage = PluginOperations.createGridFromFile(this.imageFile, refSys, true);
-        coverage = PluginOperations.reprojectCoverage(coverage, CRS.decode(Main.getProjection().toCode()));
+        coverage = PluginOperations.reprojectCoverage(coverage, CRS.decode(ProjectionRegistry.getProjection().toCode()));
         this.bbox = coverage.getEnvelope2D();
         this.image = ((PlanarImage) coverage.getRenderedImage()).getAsBufferedImage();
@@ -328,5 +328,5 @@
         public void actionPerformed(ActionEvent arg0) {
             LayerPropertiesDialog layerProps = new LayerPropertiesDialog(imageLayer, PluginOperations.crsDescriptions);
-            layerProps.setLocation(Main.parent.getWidth() / 4, Main.parent.getHeight() / 4);
+            layerProps.setLocation(MainApplication.getMainFrame().getWidth() / 4, MainApplication.getMainFrame().getHeight() / 4);
             layerProps.setVisible(true);
         }
Index: applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/ImportImageFileImporter.java
===================================================================
--- applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/ImportImageFileImporter.java	(revision 34445)
+++ applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/ImportImageFileImporter.java	(revision 34519)
@@ -11,5 +11,4 @@
 
 import org.apache.log4j.Logger;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.ExtensionFileFilter;
 import org.openstreetmap.josm.gui.MainApplication;
@@ -60,5 +59,5 @@
                 logger.error("Error while creating image layer: \n" + e.getMessage());
                 GuiHelper.runInEDT(() ->
-                    JOptionPane.showMessageDialog(Main.parent, tr("Error while creating image layer: {0}", e.getCause())));
+                    JOptionPane.showMessageDialog(MainApplication.getMainFrame(), tr("Error while creating image layer: {0}", e.getCause())));
                 continue;
             }
Index: applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/ImportImagePlugin.java
===================================================================
--- applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/ImportImagePlugin.java	(revision 34445)
+++ applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/ImportImagePlugin.java	(revision 34519)
@@ -12,7 +12,7 @@
 import org.apache.log4j.Logger;
 import org.apache.log4j.PropertyConfigurator;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.ExtensionFileFilter;
 import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.data.Preferences;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.MainMenu;
@@ -40,5 +40,5 @@
 
     // path constants
-    static final String PLUGIN_DIR = Main.pref.getPluginsDirectory().getAbsolutePath() + "/ImportImagePlugin/";
+    static final String PLUGIN_DIR = Preferences.main().getPluginsDirectory().getAbsolutePath() + "/ImportImagePlugin/";
     static final String PLUGINPROPERTIES_FILENAME = "pluginProperties.properties";
     static final String PLUGINPROPERTIES_PATH = PLUGIN_DIR + PLUGINPROPERTIES_FILENAME;
@@ -46,4 +46,8 @@
     static final String LOGGING_PROPERTIES_FILEPATH = PLUGIN_DIR + "log4j.properties/";
 
+    /**
+     * Returns Import image plugin properties.
+     * @return Import image plugin properties
+     */
     public Properties getPluginProps() {
         return pluginProps;
@@ -52,4 +56,5 @@
     /**
      * constructor
+     * @param info plugin information
      *
      * @throws IOException if any I/O error occurs
@@ -78,7 +83,5 @@
             loadFileAction = new LoadImageAction();
             loadFileAction.setEnabled(true);
-            if (Main.main != null) {
-                MainMenu.add(MainApplication.getMenu().imagerySubMenu, loadFileAction);
-            }
+            MainMenu.add(MainApplication.getMenu().imagerySubMenu, loadFileAction);
 
             ExtensionFileFilter.addImporter(new ImportImageFileImporter());
@@ -160,5 +163,5 @@
             // Set file for logging here:
             props.setProperty("log4j.appender.MyRoFiAppender.file",
-                    (Main.pref.getPluginsDirectory().getAbsolutePath() + "/ImportImagePlugin/" + "log.log"));
+                    (Preferences.main().getPluginsDirectory().getAbsolutePath() + "/ImportImagePlugin/" + "log.log"));
 
             PropertyConfigurator.configure(props);
@@ -186,5 +189,5 @@
         // Set file for logging here:
         props.setProperty("log4j.appender.A.file",
-                (Main.pref.getPluginsDirectory().getAbsolutePath() + "/ImportImagePlugin/" + "log.log"));
+                (Preferences.main().getPluginsDirectory().getAbsolutePath() + "/ImportImagePlugin/" + "log.log"));
 
         PropertyConfigurator.configure(props);
Index: applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/LoadImageAction.java
===================================================================
--- applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/LoadImageAction.java	(revision 34445)
+++ applications/editors/josm/plugins/ImportImagePlugin/src/org/openstreetmap/josm/plugins/ImportImagePlugin/LoadImageAction.java	(revision 34519)
@@ -11,9 +11,9 @@
 
 import org.apache.log4j.Logger;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.plugins.ImportImagePlugin.ImageLayer.LayerCreationCanceledException;
+import org.openstreetmap.josm.spi.preferences.Config;
 
 /**
@@ -35,14 +35,14 @@
 
     @Override
-    public void actionPerformed(ActionEvent arg0) {
+    public void actionPerformed(ActionEvent event) {
 
         // Choose a file
-        JFileChooser fc = new JFileChooser(Main.pref.get("plugins.importimage.importpath", null));
+        JFileChooser fc = new JFileChooser(Config.getPref().get("plugins.importimage.importpath", null));
         fc.setAcceptAllFileFilterUsed(false);
-        int result = fc.showOpenDialog(Main.parent);
+        int result = fc.showOpenDialog(MainApplication.getMainFrame());
 
         ImageLayer layer = null;
         if (result == JFileChooser.APPROVE_OPTION) {
-            Main.pref.put("plugins.importimage.importpath", fc.getCurrentDirectory().getAbsolutePath());
+            Config.getPref().put("plugins.importimage.importpath", fc.getCurrentDirectory().getAbsolutePath());
             logger.info("File chosen:" + fc.getSelectedFile());
             try {
