Index: applications/editors/josm/plugins/mapdust/conf/mapdust.properties
===================================================================
--- applications/editors/josm/plugins/mapdust/conf/mapdust.properties	(revision 24696)
+++ applications/editors/josm/plugins/mapdust/conf/mapdust.properties	(revision 24733)
@@ -7,2 +7,5 @@
 #the Mapdust api key
 mapdust.key=20a2790c8c8ba273ff7baa619b2cf638
+
+#the Mapdust wiki page
+mapdust.wiki=http://wiki.openstreetmap.org/wiki/JOSM/Plugins/MapDust
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java	(revision 24696)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/MapdustPlugin.java	(revision 24733)
@@ -42,5 +42,4 @@
 import org.openstreetmap.josm.gui.MapView;
 import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
-import org.openstreetmap.josm.gui.NavigatableComponent;
 import org.openstreetmap.josm.gui.NavigatableComponent.ZoomChangeListener;
 import org.openstreetmap.josm.gui.layer.Layer;
@@ -68,6 +67,6 @@
  */
 public class MapdustPlugin extends Plugin implements LayerChangeListener,
-        MouseListener, MapdustRefreshObserver, MapdustBugObserver,
-        MapdustInitialUpdateObserver {
+        ZoomChangeListener, MouseListener, MapdustRefreshObserver,
+        MapdustBugObserver, MapdustInitialUpdateObserver {
     
     /** The graphical user interface of the plugin */
@@ -92,9 +91,4 @@
         Main.pref.put("mapdust.nickname", null);
         Main.pref.put("mapdust.modify", false);
-        MapView.addLayerChangeListener(this);
-        if (Main.map != null && Main.map.mapView != null) {
-            Main.map.mapView.addMouseListener(this);
-            MapView.addLayerChangeListener(this);
-        }
     }
     
@@ -122,13 +116,6 @@
             mapdustGUI.addObserver(this);
             newMapFrame.addToggleDialog(mapdustGUI);
-            NavigatableComponent
-                    .addZoomChangeListener(new ZoomChangeListener() {
-                        
-                        @Override
-                        public void zoomChanged() {
-                            updateData();
-                        }
-                    });
             MapView.addLayerChangeListener(this);
+            MapView.addZoomChangeListener(this);
             Main.map.mapView.addMouseListener(this);
         }
@@ -152,7 +139,7 @@
                     if (this.mapdustBugList == null
                             || this.mapdustBugList.size() == 0) {
-                        String waringMessage = "There is no MapDust bug in ";
-                        waringMessage += "your visible area.";
-                        JOptionPane.showMessageDialog(Main.parent, 
+                        String waringMessage = "There is no MapDust bug ";
+                        waringMessage += "in your visible area.";
+                        JOptionPane.showMessageDialog(Main.parent,
                                 tr(waringMessage), tr("Warning"),
                                 JOptionPane.WARNING_MESSAGE);
@@ -221,4 +208,5 @@
             /* remove the layer */
             MapView.removeLayerChangeListener(this);
+            MapView.removeZoomChangeListener(this);
             Main.map.mapView.removeLayer(layer);
             Main.map.remove(mapdustGUI);
@@ -294,10 +282,9 @@
         if (mapdustLayer == null) {
             /* create and add the layer */
-            Main.map.mapView.removeAll();
-            mapdustLayer =
-                    new MapdustLayer("MapDust", mapdustGUI, mapdustBugList);
+            mapdustLayer = new MapdustLayer("MapDust", mapdustGUI, mapdustBugList);
             Main.main.addLayer(mapdustLayer);
             Main.map.mapView.moveLayer(mapdustLayer, 0);
             MapView.addLayerChangeListener(this);
+            MapView.addZoomChangeListener(this);
         } else {
             /* re-set the properties */
@@ -311,4 +298,17 @@
         Main.map.repaint();
         Main.map.mapView.repaint();
+    }
+    
+    /**
+     * Returns the bounds of the current map view.
+     * 
+     * @return A <code>Bounds</code> object
+     */
+    private Bounds getBounds() {
+        MapView mapView = Main.map.mapView;
+        Bounds bounds =
+                new Bounds(mapView.getLatLon(0, mapView.getHeight()),
+                        mapView.getLatLon(mapView.getWidth(), 0));
+        return bounds;
     }
     
@@ -331,4 +331,9 @@
     }
     
+    @Override
+    public void zoomChanged() {
+        updateData();
+    }
+    
     /**
      * Verifies if the <code>OsmDataLayer</code> layer has been added to the
@@ -383,8 +388,5 @@
             throws MapdustServiceHandlerException {
         /* get the bounding box */
-        MapView mapView = Main.map.mapView;
-        Bounds bounds =
-                new Bounds(mapView.getLatLon(0, mapView.getHeight()),
-                        mapView.getLatLon(mapView.getWidth(), 0));
+        Bounds bounds = getBounds();
         Double minLon = bounds.getMin().lon();
         Double minLat = bounds.getMin().lat();
@@ -471,6 +473,4 @@
     
     /**
-     * Returns the list of MapDust bugs
-     * 
      * @return the mapdustBugList
      */
@@ -480,6 +480,4 @@
     
     /**
-     * Sets the list of MapDust bugs
-     * 
      * @param mapdustBugList the mapdustBugList to set
      */
@@ -487,3 +485,4 @@
         this.mapdustBugList = mapdustBugList;
     }
+    
 }
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustGUI.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustGUI.java	(revision 24696)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/MapdustGUI.java	(revision 24733)
@@ -225,7 +225,4 @@
             add(mainPanel, BorderLayout.CENTER);
         }
-        /* invalidate and repaint */
-        invalidate();
-        repaint();
     }
 
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustBugDetailsPanel.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustBugDetailsPanel.java	(revision 24696)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustBugDetailsPanel.java	(revision 24733)
@@ -34,4 +34,5 @@
 import java.awt.Font;
 import java.awt.GridLayout;
+import java.net.URI;
 import java.text.DateFormat;
 import java.util.Locale;
@@ -46,4 +47,5 @@
 import org.openstreetmap.josm.plugins.mapdust.service.value.MapdustBug;
 import org.openstreetmap.josm.plugins.mapdust.util.Configuration;
+import org.openstreetmap.josm.tools.OpenBrowser;
 
 
@@ -136,6 +138,4 @@
     public void hyperlinkUpdate(HyperlinkEvent event) {
         if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
-            java.awt.Desktop desktop = java.awt.Desktop.getDesktop();
-            java.net.URI uri;
             String bugDetailsUrl = null;
             if (bug != null) {
@@ -146,8 +146,8 @@
             if (bugDetailsUrl != null) {
                 try {
-                    uri = new java.net.URI(bugDetailsUrl);
-                    desktop.browse(uri);
+                    OpenBrowser.displayUrl(new URI(bugDetailsUrl));
                 } catch (Exception e) {
-                    String errorMessage = "Error opening the MapDust wiki page";
+                    String errorMessage = "Error opening the MapDust bug ";
+                    errorMessage += "details page";
                     JOptionPane.showMessageDialog(Main.parent,
                             tr(errorMessage), tr("Error"),
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustHelpPanel.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustHelpPanel.java	(revision 24696)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/gui/component/panel/MapdustHelpPanel.java	(revision 24733)
@@ -33,4 +33,5 @@
 import java.awt.Color;
 import java.awt.Dimension;
+import java.net.URI;
 import javax.swing.JEditorPane;
 import javax.swing.JOptionPane;
@@ -42,16 +43,18 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.plugins.mapdust.gui.component.util.ComponentUtil;
+import org.openstreetmap.josm.tools.OpenBrowser;
+import org.openstreetmap.josm.plugins.mapdust.util.Configuration;
 
 
 /**
  * Defines the JPanel which displays the Help.
- *
+ * 
  * @author Bea
  */
 public class MapdustHelpPanel extends JPanel implements HyperlinkListener {
-
+    
     /** The serial version UID */
     private static final long serialVersionUID = 1L;
-
+    
     /**
      * Builds a <code>MapdustDescriptionPanel</code> object
@@ -78,15 +81,11 @@
         add(cmpDescription, BorderLayout.CENTER);
     }
-
+    
     @Override
     public void hyperlinkUpdate(HyperlinkEvent event) {
         if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
-            java.awt.Desktop desktop = java.awt.Desktop.getDesktop();
-            String url =
-                    "http://wiki.openstreetmap.org/wiki/JOSM/Plugins/MapDust";
-            java.net.URI uri;
+            String url = Configuration.getInstance().getMapdustWiki();
             try {
-                uri = new java.net.URI(url);
-                desktop.browse(uri);
+                OpenBrowser.displayUrl(new URI(url));
             } catch (Exception e) {
                 String errorMessage = "Error opening the MapDust wiki page";
@@ -94,7 +93,6 @@
                         tr("Error"), JOptionPane.ERROR_MESSAGE);
             }
-
         }
     }
-
+    
 }
Index: applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/Configuration.java
===================================================================
--- applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/Configuration.java	(revision 24696)
+++ applications/editors/josm/plugins/mapdust/src/org/openstreetmap/josm/plugins/mapdust/util/Configuration.java	(revision 24733)
@@ -56,4 +56,7 @@
     private String mapdustBugDetailsUrl;
 
+    /** The MapDust wiki url */
+    private String mapdustWiki;
+    
     /**
      * Returns the only instance of this singleton object type.
@@ -93,4 +96,11 @@
                     "", "mapdust");
         }
+        
+        try {
+            mapdustWiki = properties.getString("mapdust.wiki");
+        } catch (RuntimeException e) {
+            throw new MissingResourceException("Could not read mapdust.wikis ",
+                    "", "mapdust");
+        }
     }
 
@@ -122,3 +132,11 @@
     }
 
+    /**
+     * Returns the MapDust wiki URL
+     *
+     * @return the mapdustWiki
+     */
+    public String getMapdustWiki() {
+        return mapdustWiki;
+    }
 }
