Index: /applications/editors/josm/plugins/mapillary/build.xml
===================================================================
--- /applications/editors/josm/plugins/mapillary/build.xml	(revision 31182)
+++ /applications/editors/josm/plugins/mapillary/build.xml	(revision 31183)
@@ -30,5 +30,5 @@
     <!-- <property name="plugin.link" value="..."/>-->
     <!--<property name="plugin.early" value="..."/>-->
-    <!--<property name="plugin.requires" value="commons-imagery"/>-->
+    <!--<property name="plugin.requires" value="commons-imaging"/>-->
     <!--<property name="plugin.stage" value="..."/>-->
     
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java	(revision 31182)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java	(revision 31183)
@@ -49,4 +49,6 @@
 		MouseListener, DataSetListener, EditLayerChangeListener {
 
+	public final static int SEQUENCE_MAX_JUMP_DISTANCE = 100;
+	
 	public static Boolean INSTANCED = false;
 	public static MapillaryLayer INSTANCE;
@@ -249,9 +251,8 @@
 	private MapillaryImage[] getClosestImagesFromDifferentSequences() {
 		MapillaryImage[] ret = new MapillaryImage[2];
-		double[] distances = { 100, 100 };
+		double[] distances = { SEQUENCE_MAX_JUMP_DISTANCE, SEQUENCE_MAX_JUMP_DISTANCE };
 		LatLon selectedCoords = mapillaryData.getSelectedImage().getLatLon();
-		double maxJumpDistance = 100;
 		for (MapillaryImage image : mapillaryData.getImages()) {
-			if (image.getLatLon().greatCircleDistance(selectedCoords) < maxJumpDistance
+			if (image.getLatLon().greatCircleDistance(selectedCoords) < SEQUENCE_MAX_JUMP_DISTANCE
 					&& mapillaryData.getSelectedImage().getSequence() != image
 							.getSequence()) {
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java	(revision 31182)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryPlugin.java	(revision 31183)
@@ -37,5 +37,7 @@
 	public MapillaryPlugin(PluginInformation info) {
 		super(info);
-		Main.logLevel = 1;
+		synchronized (this) {
+			Main.logLevel = 1;
+		}
 		downloadAction = new MapillaryDownloadAction();
 		exportAction = new MapillaryExportAction();
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryToggleDialog.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryToggleDialog.java	(revision 31182)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryToggleDialog.java	(revision 31183)
@@ -105,33 +105,32 @@
 				return;
 			}
-			if (this.image != null) {
-				this.nextButton.setEnabled(true);
-				this.previousButton.setEnabled(true);
-				if (this.image.next() == null)
-					this.nextButton.setEnabled(false);
-				if (this.image.previous() == null)
-					this.previousButton.setEnabled(false);
-					
-				CacheAccess<String, BufferedImageCacheEntry> prev;
-				try {
-					this.mapillaryImageDisplay.setImage(null);
-					prev = JCSCacheManager.getCache("mapillary");
-					if (thumbnailCache != null)
-						thumbnailCache.cancelOutstandingTasks();
-					thumbnailCache = new MapillaryCache(image.getKey(),
-							MapillaryCache.Type.THUMBNAIL, prev, 200000,
-							200000, new HashMap<String, String>());
-					thumbnailCache.submit(this, false);
-
-					if (imageCache != null)
-						imageCache.cancelOutstandingTasks();
-					imageCache = new MapillaryCache(image.getKey(),
-							MapillaryCache.Type.FULL_IMAGE, prev, 200000,
-							200000, new HashMap<String, String>());
-					imageCache.submit(this, false);
-				} catch (IOException e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
-				}
+			if (this.image == null)
+				return;
+			this.nextButton.setEnabled(true);
+			this.previousButton.setEnabled(true);
+			if (this.image.next() == null)
+				this.nextButton.setEnabled(false);
+			if (this.image.previous() == null)
+				this.previousButton.setEnabled(false);
+
+			CacheAccess<String, BufferedImageCacheEntry> prev;
+			try {
+				this.mapillaryImageDisplay.setImage(null);
+				prev = JCSCacheManager.getCache("mapillary");
+				if (thumbnailCache != null)
+					thumbnailCache.cancelOutstandingTasks();
+				thumbnailCache = new MapillaryCache(image.getKey(),
+						MapillaryCache.Type.THUMBNAIL, prev, 200000, 200000,
+						new HashMap<String, String>());
+				thumbnailCache.submit(this, false);
+
+				if (imageCache != null)
+					imageCache.cancelOutstandingTasks();
+				imageCache = new MapillaryCache(image.getKey(),
+						MapillaryCache.Type.FULL_IMAGE, prev, 200000, 200000,
+						new HashMap<String, String>());
+				imageCache.submit(this, false);
+			} catch (IOException e) {
+				Main.error(e);
 			}
 		}
@@ -173,6 +172,5 @@
 			if (MapillaryToggleDialog.getInstance().getImage() != null) {
 				MapillaryData.getInstance().selectNext();
-				if (MapillaryData.getInstance()
-						.getSelectedImage() != null)
+				if (MapillaryData.getInstance().getSelectedImage() != null)
 					Main.map.mapView.zoomTo(MapillaryData.getInstance()
 							.getSelectedImage().getLatLon());
@@ -198,6 +196,5 @@
 			if (MapillaryToggleDialog.getInstance().getImage() != null) {
 				MapillaryData.getInstance().selectPrevious();
-				if (MapillaryData.getInstance()
-						.getSelectedImage() != null)
+				if (MapillaryData.getInstance().getSelectedImage() != null)
 					Main.map.mapView.zoomTo(MapillaryData.getInstance()
 							.getSelectedImage().getLatLon());
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryExportWriterThread.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryExportWriterThread.java	(revision 31182)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryExportWriterThread.java	(revision 31183)
@@ -25,5 +25,5 @@
 
 /**
- * Writes the images from the queue in the HD.
+ * Writes the images from the queue in the file system.
  * 
  * @author nokutu
