Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideAbstractImage.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideAbstractImage.java	(revision 34433)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideAbstractImage.java	(revision 34577)
@@ -5,6 +5,6 @@
 
 /**
- * Abstract superclass for all image objects. At the moment there are 3,
- * {@link StreetsideImportedImage}, {@link StreetsideImage}, {@link StreetsideCubemap}.
+ * Abstract superclass for all image objects. At the moment there are 2,
+ * {@link StreetsideImage}, {@link StreetsideCubemap}.
  *
  * @author nokutu
@@ -276,5 +276,5 @@
 	 * Turns the image direction.
 	 *
-	 * @param ca
+	 * @param he
 	 *            The angle the image is moving.
 	 */
Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideData.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideData.java	(revision 34433)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideData.java	(revision 34577)
@@ -12,5 +12,4 @@
 
 import org.apache.commons.jcs.access.CacheAccess;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.cache.BufferedImageCacheEntry;
@@ -64,9 +63,7 @@
   // Adds the basic set of listeners.
   Arrays.stream(StreetsidePlugin.getStreetsideDataListeners()).forEach(this::addListener);
-    if (Main.main != null) {
       addListener(StreetsideViewerDialog.getInstance().getStreetsideViewerPanel());
       addListener(StreetsideMainDialog.getInstance());
       addListener(ImageInfoPanel.getInstance());
-    }
   }
 
Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideLayer.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideLayer.java	(revision 34433)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsideLayer.java	(revision 34577)
@@ -22,5 +22,4 @@
 
 import org.apache.log4j.Logger;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -115,5 +114,5 @@
     }
     // Does not execute when in headless mode
-    if (Main.main != null && !StreetsideMainDialog.getInstance().isShowing()) {
+    if (!StreetsideMainDialog.getInstance().isShowing()) {
       StreetsideMainDialog.getInstance().showDialog();
     }
Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsidePlugin.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsidePlugin.java	(revision 34433)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/StreetsidePlugin.java	(revision 34577)
@@ -2,5 +2,4 @@
 package org.openstreetmap.josm.plugins.streetside;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.MainMenu;
@@ -38,5 +37,4 @@
 
   static {
-    if (Main.main != null) {
       MainMenu.add(MainApplication.getMenu().fileMenu, new StreetsideExportAction(), false, 14);
       MainMenu.add(MainApplication.getMenu().imagerySubMenu, new StreetsideDownloadAction(), false);
@@ -44,5 +42,4 @@
       MainMenu.add(MainApplication.getMenu().fileMenu, new StreetsideDownloadViewAction(), false, 14);
       MainMenu.add(MainApplication.getMenu().moreToolsMenu, WALK_ACTION, false);
-    }
   }
 
Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/actions/StreetsideExportAction.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/actions/StreetsideExportAction.java	(revision 34433)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/actions/StreetsideExportAction.java	(revision 34577)
@@ -15,5 +15,4 @@
 
 import org.apache.log4j.Logger;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.gui.MainApplication;
@@ -66,5 +65,5 @@
     pane.setOptions(new JButton[] {ok, cancel});
 
-    JDialog dlg = pane.createDialog(Main.parent, tr("Export Streetside images"));
+    JDialog dlg = pane.createDialog(MainApplication.getMainFrame(), tr("Export Streetside images"));
     dlg.setMinimumSize(new Dimension(400, 150));
     dlg.setVisible(true);
Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/actions/StreetsideWalkAction.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/actions/StreetsideWalkAction.java	(revision 34433)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/actions/StreetsideWalkAction.java	(revision 34577)
@@ -12,6 +12,6 @@
 import javax.swing.JOptionPane;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.plugins.streetside.StreetsideAbstractImage;
 import org.openstreetmap.josm.plugins.streetside.StreetsideDataListener;
@@ -50,5 +50,5 @@
     JOptionPane pane = new JOptionPane(dialog, JOptionPane.PLAIN_MESSAGE,
         JOptionPane.OK_CANCEL_OPTION);
-    JDialog dlg = pane.createDialog(Main.parent, tr("Walk mode"));
+    JDialog dlg = pane.createDialog(MainApplication.getMainFrame(), tr("Walk mode"));
     dlg.setMinimumSize(new Dimension(400, 150));
     dlg.setVisible(true);
Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cache/Caches.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cache/Caches.java	(revision 34433)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/cache/Caches.java	(revision 34577)
@@ -11,5 +11,5 @@
 import org.apache.commons.jcs.engine.behavior.IElementAttributes;
 import org.apache.log4j.Logger;
-import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.Preferences;
 import org.openstreetmap.josm.data.cache.BufferedImageCacheEntry;
 import org.openstreetmap.josm.data.cache.JCSCacheManager;
@@ -26,5 +26,5 @@
 
 	public static File getCacheDirectory() {
-		final File f = new File(Main.pref.getPluginsDirectory().getPath() + "/MicrosoftStreetside/cache");
+		final File f = new File(Preferences.main().getPluginsDirectory().getPath() + "/MicrosoftStreetside/cache");
 		if (!f.exists()) {
 			f.mkdirs();
Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/AddTagToPrimitiveAction.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/AddTagToPrimitiveAction.java	(revision 34433)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/AddTagToPrimitiveAction.java	(revision 34577)
@@ -7,7 +7,7 @@
 import javax.swing.JOptionPane;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.osm.AbstractPrimitive;
 import org.openstreetmap.josm.data.osm.Tag;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.tools.I18n;
 import org.openstreetmap.josm.tools.ImageProvider;
@@ -45,5 +45,5 @@
       if (target.hasKey(tag.getKey()) && !target.hasTag(tag.getKey(), tag.getValue())) {
         conflictResolution = JOptionPane.showConfirmDialog(
-          Main.parent,
+          MainApplication.getMainFrame(),
           "<html>" +
             I18n.tr("A tag with key <i>{0}</i> is already present on the selected OSM object.", tag.getKey()) + "<br>" +
Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/StreetsideViewerPanel.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/StreetsideViewerPanel.java	(revision 34433)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/gui/imageinfo/StreetsideViewerPanel.java	(revision 34577)
@@ -44,11 +44,5 @@
 		super(new BorderLayout());
 
-		SwingUtilities.invokeLater(new Runnable() {
-		     @SuppressWarnings("synthetic-access")
-        @Override
-		     public void run() {
-		    	 initializeAndStartGUI();
-		     }
-		 });
+		SwingUtilities.invokeLater(() -> initializeAndStartGUI());
 
 		selectedImageChanged(null, null);
Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/oauth/OAuthPortListener.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/oauth/OAuthPortListener.java	(revision 34433)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/oauth/OAuthPortListener.java	(revision 34577)
@@ -15,5 +15,4 @@
 
 import org.apache.log4j.Logger;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.plugins.streetside.utils.StreetsideProperties;
 import org.openstreetmap.josm.tools.I18n;
@@ -71,5 +70,4 @@
    // Saves the access token in preferences.
    StreetsideUser.setTokenValid(true);
-   if (Main.main != null) {
      StreetsideProperties.ACCESS_TOKEN.put(accessToken);
      String username = StreetsideUser.getUsername();
@@ -78,5 +76,4 @@
        callback.onLogin(username);
      }
-   }
  } catch (BindException e) {
    logger.warn(e);
Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/GraphicsUtils.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/GraphicsUtils.java	(revision 34433)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/GraphicsUtils.java	(revision 34577)
@@ -25,6 +25,4 @@
 
 	public static javafx.scene.image.Image convertBufferedImage2JavaFXImage(BufferedImage bf) {
-	  //Image res = SwingFXUtils.toFXImage(bf, null);
-	  long startTime = System.currentTimeMillis();
 		WritableImage res = null;
 		if (bf != null) {
Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/PluginState.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/PluginState.java	(revision 34433)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/PluginState.java	(revision 34577)
@@ -7,5 +7,5 @@
 
 import org.apache.log4j.Logger;
-import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.tools.I18n;
 
@@ -101,5 +101,5 @@
   public static void imageUploaded() {
     imagesUploaded++;
-    if (imagesToUpload == imagesUploaded && Main.main != null) {
+    if (imagesToUpload == imagesUploaded) {
         finishedUploadDialog(imagesUploaded);
     }
@@ -108,5 +108,5 @@
   private static void finishedUploadDialog(int numImages) {
     JOptionPane.showMessageDialog(
-      Main.parent,
+      MainApplication.getMainFrame(),
       tr("You have successfully uploaded {0} images to Bing.com", numImages),
       tr("Finished upload"),
@@ -116,9 +116,6 @@
 
   public static void notLoggedInToMapillaryDialog() {
-    if (Main.main == null) {
-      return;
-    }
     JOptionPane.showMessageDialog(
-        Main.parent,
+        MainApplication.getMainFrame(),
         tr("You are not logged in, please log in to Streetside in the preferences"),
         tr("Not Logged in to Streetside"),
@@ -126,6 +123,4 @@
     );
   }
-
-
 
   /**
Index: applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/StreetsideSequenceIdGenerator.java
===================================================================
--- applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/StreetsideSequenceIdGenerator.java	(revision 34433)
+++ applications/editors/josm/plugins/MicrosoftStreetside/src/org/openstreetmap/josm/plugins/streetside/utils/StreetsideSequenceIdGenerator.java	(revision 34577)
@@ -9,6 +9,6 @@
  * handle sequences of contiguous imagery, but Streetside only has implicit
  * sequences defined by the "pre" and "ne" attributes.
- * <p/>
- * @See StreetsideSequence
+ * 
+ * See {@link org.openstreetmap.josm.plugins.streetside.StreetsideSequence}
  */
 public class StreetsideSequenceIdGenerator {
@@ -17,9 +17,7 @@
     // private constructor to avoid instantiation
   }
+
   public static String generateId() {
-
     return UUID.randomUUID().toString();
-
   }
-
 }
