Index: /applications/editors/josm/plugins/MicrosoftStreetside/.project
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/.project	(revision 34576)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/.project	(revision 34577)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>MicrosoftStreetside</name>
+	<name>JOSM-MicrosoftStreetside</name>
 	<comment>Allows the user to work with pictures hosted at mapillary.com</comment>
 	<projects>
Index: /applications/editors/josm/plugins/MicrosoftStreetside/build.xml
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/build.xml	(revision 34576)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/build.xml	(revision 34577)
@@ -12,8 +12,7 @@
 	<property name="commit.message" value="Commit message" />
 	<!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-	<property name="plugin.main.version" value="13860" />
-	<property name="plugin.version" value="13860" />
-	
-  <property name="plugin.author" value="renerr18" />
+	<property name="plugin.main.version" value="14153" />
+
+	<property name="plugin.author" value="renerr18" />
 	<property name="plugin.class" value="org.openstreetmap.josm.plugins.streetside.StreetsidePlugin" />
 	<property name="plugin.description" value="View high resolution Microsoft Streetside 360 degree imagery in JOSM." />
@@ -33,5 +32,5 @@
 	<import file="../build-common.xml"/>
 
-	<path id="ivy.lib.path" path="ant/ivy-2.4.0.jar" />
+	<path id="ivy.lib.path" path="ant/ivy-2.5.0-rc1.jar" />
 	<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path" />
 
@@ -57,5 +56,6 @@
 	<target name="fetch_dependencies" depends="clean_ivy">
 		<echo>fetching dependencies with ivy</echo>
-		<ivy:retrieve pattern="${plugin.lib.dir}/[artifact]-[type].[ext]" conf="default" />
+		<ivy:settings file="ivy_settings.xml" />
+		<ivy:retrieve pattern="${plugin.lib.dir}/[artifact]-[revision](-[classifier]).[ext]" conf="default" />
 	</target>
 
Index: /applications/editors/josm/plugins/MicrosoftStreetside/ivy.xml
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/ivy.xml	(revision 34576)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/ivy.xml	(revision 34577)
@@ -1,3 +1,3 @@
-<ivy-module version="2.0">
+<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
 	<info organisation="org.openstreetmap.josm.plugins" module="MicrosoftStreetside" revision="0.0.1" />
 	<configurations defaultconf="default" defaultconfmapping="default->default">
Index: /applications/editors/josm/plugins/MicrosoftStreetside/ivy_settings.xml
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/ivy_settings.xml	(revision 34577)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/ivy_settings.xml	(revision 34577)
@@ -0,0 +1,17 @@
+<ivysettings>
+    <version-matchers usedefaults="true">
+        <maven-tsnap-vm/>
+    </version-matchers>
+    <settings defaultResolver="central"/>
+    <resolvers>
+        <ibiblio name="central" m2compatible="true"/>
+        <ibiblio name="gluon" root="http://nexus.gluonhq.com/nexus/content/repositories/releases/" m2compatible="true" />
+        <ibiblio name="josm" root="https://josm.openstreetmap.de/nexus/content/repositories/releases/" m2compatible="true" />
+        <ibiblio name="sonatype_snapshots" root="https://oss.sonatype.org/content/repositories/snapshots/" m2compatible="true"  />
+    </resolvers>
+    <modules>
+        <module organisation="org.openjfx" resolver="sonatype_snapshots" />
+        <module organisation="org.openstreetmap.jmapviewer" resolver="josm"/>
+        <module organisation="org.openstreetmap.josm" resolver="josm"/>
+    </modules>
+</ivysettings>
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 34576)
+++ /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 34576)
+++ /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 34576)
+++ /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 34576)
+++ /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 34576)
+++ /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 34576)
+++ /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 34576)
+++ /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 34576)
+++ /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 34576)
+++ /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 34576)
+++ /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 34576)
+++ /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 34576)
+++ /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 34576)
+++ /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();
-
   }
-
 }
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/io/download/SequenceDownloadRunnableTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/io/download/SequenceDownloadRunnableTest.java	(revision 34576)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/io/download/SequenceDownloadRunnableTest.java	(revision 34577)
@@ -23,5 +23,5 @@
 
   @Rule
-  public JOSMTestRules rules = new StreetsideTestRules().platform();
+  public JOSMTestRules rules = new StreetsideTestRules();
 
   private static final Function<Bounds, URL> SEARCH_SEQUENCES_URL_GEN = b -> {
Index: /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/PluginStateTest.java
===================================================================
--- /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/PluginStateTest.java	(revision 34576)
+++ /applications/editors/josm/plugins/MicrosoftStreetside/test/unit/org/openstreetmap/josm/plugins/streetside/utils/PluginStateTest.java	(revision 34577)
@@ -5,6 +5,4 @@
 
 import org.junit.Test;
-
-import org.openstreetmap.josm.Main;
 
 /**
@@ -37,5 +35,4 @@
   @Test
   public void uploadTest() {
-    Main.main = null;
     assertEquals(false, PluginState.isUploading());
     PluginState.addImagesToUpload(2);
