Index: /applications/editors/josm/plugins/terracer/build.xml
===================================================================
--- /applications/editors/josm/plugins/terracer/build.xml	(revision 15857)
+++ /applications/editors/josm/plugins/terracer/build.xml	(revision 15858)
@@ -25,4 +25,5 @@
                 <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
                 <attribute name="Plugin-Description" value="Make terraced houses out of single blocks."/>
+                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Terracer"/>
                 <attribute name="Plugin-Mainversion" value="1598"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Grabber.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Grabber.java	(revision 15857)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Grabber.java	(revision 15858)
@@ -3,14 +3,14 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.awt.image.BufferedImage;
-import java.awt.Graphics;
 import java.awt.Color;
 import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.projection.Projection;
 import org.openstreetmap.josm.gui.MapView;
-import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.io.CacheFiles;
 
@@ -24,6 +24,5 @@
     protected CacheFiles cache;
 
-    Grabber(Bounds b, Projection proj, double pixelPerDegree, GeorefImage image,
-    MapView mv, WMSLayer layer, CacheFiles cache)
+    Grabber(Bounds b, GeorefImage image, MapView mv, WMSLayer layer, CacheFiles cache)
     {
         if (b.min != null && b.max != null && WMSPlugin.doOverlap)
@@ -46,6 +45,6 @@
             this.b = b;
 
-        this.proj = proj;
-        this.pixelPerDegree = pixelPerDegree;
+        this.proj = Main.main.proj;
+        this.pixelPerDegree = layer.pixelPerDegree;
         this.image = image;
         this.mv = mv;
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Map_Rectifier_WMSmenuAction.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Map_Rectifier_WMSmenuAction.java	(revision 15857)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Map_Rectifier_WMSmenuAction.java	(revision 15858)
@@ -3,11 +3,10 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.awt.GridBagLayout;
+import java.awt.Toolkit;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
-import java.awt.datatransfer.DataFlavor;
-import java.awt.datatransfer.Transferable;
-import java.awt.GridBagLayout;
-import java.awt.Toolkit;
-
 import java.util.ArrayList;
 import java.util.regex.Matcher;
@@ -21,8 +20,7 @@
 import javax.swing.JTextField;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.gui.ExtendedDialog;
-import org.openstreetmap.josm.gui.MapView;
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.tools.GBC;
 import org.openstreetmap.josm.tools.Shortcut;
@@ -34,17 +32,17 @@
      */
     public class rectifierService {
-        private String name;
-        private String url;
-        private String wmsUrl;
-        private Pattern urlRegEx;
-        private Pattern idValidator;
+        private final String name;
+        private final String url;
+        private final String wmsUrl;
+        private final Pattern urlRegEx;
+        private final Pattern idValidator;
         public JRadioButton btn;
         /**
-          * @param name: Name of the rectifing service
-          * @param url: URL to the service where users can register, upload, etc.
-          * @param wmsUrl: URL to the WMS server where JOSM will grab the images. Insert __s__ where the ID should be placed
-          * @param urlRegEx: a regular expression that determines if a given URL is one of the service and returns the WMS id if so
-          * @param idValidator: regular expression that checks if a given ID is syntactically valid
-          */
+         * @param name: Name of the rectifing service
+         * @param url: URL to the service where users can register, upload, etc.
+         * @param wmsUrl: URL to the WMS server where JOSM will grab the images. Insert __s__ where the ID should be placed
+         * @param urlRegEx: a regular expression that determines if a given URL is one of the service and returns the WMS id if so
+         * @param idValidator: regular expression that checks if a given ID is syntactically valid
+         */
         public rectifierService(String name, String url, String wmsUrl, String urlRegEx, String idValidator) {
             this.name = name;
@@ -62,16 +60,16 @@
     /**
      * List of available rectifier services. May be extended from the outside
-    */
+     */
     public ArrayList<rectifierService> services = new ArrayList<rectifierService>();
 
     public Map_Rectifier_WMSmenuAction() {
         super(tr("Rectified Image..."),
-            "OLmarker",
-            tr("Download Rectified Images From Various Services"),
-            Shortcut.registerShortcut("wms:rectimg",
-                tr("WMS: {0}", tr("Rectified Image...")),
-                KeyEvent.VK_R,
-                Shortcut.GROUP_NONE),
-            true
+                "OLmarker",
+                tr("Download Rectified Images From Various Services"),
+                Shortcut.registerShortcut("wms:rectimg",
+                        tr("WMS: {0}", tr("Rectified Image...")),
+                        KeyEvent.VK_R,
+                        Shortcut.GROUP_NONE),
+                        true
         );
 
@@ -81,5 +79,5 @@
                 "http://labs.metacarta.com/rectifier/",
                 "http://labs.metacarta.com/rectifier/wms.cgi?id=__s__&srs=EPSG:4326"
-                    + "&Service=WMS&Version=1.1.0&Request=GetMap&format=image/png",
+                + "&Service=WMS&Version=1.1.0&Request=GetMap&format=image/png",
                 // This matches more than the "classic" WMS link, so users can pretty much
                 // copy any link as long as it includes the ID
@@ -94,8 +92,8 @@
                 "http://warper.geothings.net/",
                 "http://warper.geothings.net/maps/wms/__s__?request=GetMap&version=1.1.1"
-                    + "&styles=&format=image/png&srs=epsg:4326&exceptions=application/vnd.ogc.se_inimage",
+                + "&styles=&format=image/png&srs=epsg:4326&exceptions=application/vnd.ogc.se_inimage",
                 // This matches more than the "classic" WMS link, so users can pretty much
                 // copy any link as long as it includes the ID
-                "(?:mapwarper\\.net|warper\\.geothings\\.net/(?:.*?)/([0-9]+)(?:\\?|/|\\.|$)",
+                "(?:mapwarper\\.net|warper\\.geothings\\.net)/(?:.*?)/([0-9]+)(?:\\?|/|\\.|$)",
                 "^[0-9]+$")
         );
@@ -127,5 +125,5 @@
             // service will be pre-selected.
             if(!clip.equals("") && tfWmsUrl.getText().equals("")
-                && (s.urlRegEx.matcher(clip).find() || s.idValidator.matcher(clip).matches())) {
+                    && (s.urlRegEx.matcher(clip).find() || s.idValidator.matcher(clip).matches())) {
                 serviceBtn.setSelected(true);
                 tfWmsUrl.setText(clip);
@@ -148,8 +146,8 @@
 
         ExtendedDialog diag = new ExtendedDialog(Main.parent,
-                            tr("Add Rectified Image"),
-                            panel,
-                            new String[] {tr("Add Rectified Image"), tr("Cancel")},
-                            new String[] {"OLmarker.png", "cancel.png"});
+                tr("Add Rectified Image"),
+                panel,
+                new String[] {tr("Add Rectified Image"), tr("Cancel")},
+                new String[] {"OLmarker.png", "cancel.png"});
 
         // This repeatedly shows the dialog in case there has been an error.
@@ -198,7 +196,7 @@
             // and display an error message. The while(true) ensures that the dialog pops up again
             JOptionPane.showMessageDialog(Main.parent,
-                tr("Couldn't match the entered link or id to the selected service. Please try again."),
-                tr("No valid WMS URL or id"),
-                JOptionPane.ERROR_MESSAGE);
+                    tr("Couldn't match the entered link or id to the selected service. Please try again."),
+                    tr("No valid WMS URL or id"),
+                    JOptionPane.ERROR_MESSAGE);
             diag.setVisible(true);
         }
@@ -206,11 +204,21 @@
 
     /**
-     * Adds a WMS Layer with given title and UR:
+     * Adds a WMS Layer with given title and URL
      * @param title: Name of the layer as it will shop up in the layer manager
      * @param url: URL to the WMS server
+     * @param cookies: Cookies to send with each image request (Format: josm=is; very=cool)
+     */
+    private void addWMSLayer(String title, String url, String cookies) {
+        WMSLayer wmsLayer = new WMSLayer(title, url, cookies);
+        Main.main.addLayer(wmsLayer);
+    }
+
+    /**
+     * Adds a WMS Layer with given title and URL
+     * @param title: Name of the layer as it will shop up in the layer manager
+     * @param url: URL to the WMS server
      */
     private void addWMSLayer(String title, String url) {
-        WMSLayer wmsLayer = new WMSLayer(title, url);
-        Main.main.addLayer(wmsLayer);
+        addWMSLayer(title, url, "");
     }
 
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSDownloadAction.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSDownloadAction.java	(revision 15857)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSDownloadAction.java	(revision 15858)
@@ -7,11 +7,8 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.actions.JosmAction;
-import org.openstreetmap.josm.gui.MapView;
-import org.openstreetmap.josm.gui.layer.Layer;
-import org.openstreetmap.josm.data.Bounds;
 
 public class WMSDownloadAction extends JosmAction {
 
-    private WMSInfo info;
+    private final WMSInfo info;
 
     public WMSDownloadAction(WMSInfo info) {
@@ -24,5 +21,5 @@
         System.out.println(info.url);
 
-        WMSLayer wmsLayer = new WMSLayer(info.name, info.url);
+        WMSLayer wmsLayer = new WMSLayer(info.name, info.url, info.cookies);
         Main.main.addLayer(wmsLayer);
     }
@@ -30,5 +27,5 @@
     public static WMSLayer getLayer(WMSInfo info) {
         // FIXME: move this to WMSPlugin/WMSInfo/preferences.
-        WMSLayer wmsLayer = new WMSLayer(info.name, info.url);
+        WMSLayer wmsLayer = new WMSLayer(info.name, info.url, info.cookies);
         Main.main.addLayer(wmsLayer);
         return wmsLayer;
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java	(revision 15857)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java	(revision 15858)
@@ -17,5 +17,4 @@
 import java.text.NumberFormat;
 import java.util.Locale;
-import java.util.concurrent.TimeUnit;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -26,5 +25,4 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
-import org.openstreetmap.josm.data.projection.Projection;
 import org.openstreetmap.josm.gui.MapView;
 import org.openstreetmap.josm.io.CacheFiles;
@@ -34,11 +32,9 @@
 public class WMSGrabber extends Grabber {
     protected String baseURL;
-    private static Boolean shownWarning = false;
-    private boolean urlWithPatterns;
+    private final boolean urlWithPatterns;
 
-    WMSGrabber(String baseURL, Bounds b, Projection proj,
-            double pixelPerDegree, GeorefImage image, MapView mv, WMSLayer layer, CacheFiles cache) {
-        super(b, proj, pixelPerDegree, image, mv, layer, cache);
-        this.baseURL = baseURL;
+    WMSGrabber(Bounds b, GeorefImage image, MapView mv, WMSLayer layer, CacheFiles cache) {
+        super(b, image, mv, layer, cache);
+        this.baseURL = layer.baseURL;
         /* URL containing placeholders? */
         urlWithPatterns = baseURL != null && baseURL.contains("{1}");
@@ -71,6 +67,5 @@
     }
 
-    public static final NumberFormat
-        latLonFormat = new DecimalFormat("###0.0000000",
+    public static final NumberFormat latLonFormat = new DecimalFormat("###0.0000000",
             new DecimalFormatSymbols(Locale.US));
 
@@ -78,8 +73,8 @@
             int wi, int ht) throws MalformedURLException {
         String str = baseURL;
-        String bbox = latLonFormat.format(w) + "," +
-                      latLonFormat.format(s) + "," +
-                      latLonFormat.format(e) + "," +
-                      latLonFormat.format(n);
+        String bbox = latLonFormat.format(w) + ","
+                           + latLonFormat.format(s) + ","
+                           + latLonFormat.format(e) + ","
+                           + latLonFormat.format(n);
 
         if (urlWithPatterns) {
@@ -132,6 +127,8 @@
         BufferedImage cached = cache.getImg(url.toString());
         if(cached != null) return cached;
-    
+
         HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+        if(layer.cookies != null && !layer.cookies.equals(""))
+            conn.setRequestProperty("Cookie", layer.cookies);
         conn.setConnectTimeout(Main.pref.getInteger("wmsplugin.timeout.connect", 30) * 1000);
         conn.setReadTimeout(Main.pref.getInteger("wmsplugin.timeout.read", 30) * 1000);
@@ -146,5 +143,5 @@
         BufferedImage img = ImageIO.read(is);
         is.close();
-        
+
         cache.saveImg(url.toString(), img);
         return img;
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSInfo.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSInfo.java	(revision 15857)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSInfo.java	(revision 15858)
@@ -12,10 +12,17 @@
     String name;
     String url;
+    String cookies;
     int prefid;
 
     public WMSInfo(String name, String url, int prefid) {
-        this.name=name; this.url=url; this.prefid=prefid;
+        this(name, url, null, prefid);
     }
 
+    public WMSInfo(String name, String url, String cookies, int prefid) {
+        this.name=name;
+        this.url=url;
+        this.cookies=cookies;
+        this.prefid=prefid;
+    }
 
     public void save() {
@@ -23,7 +30,7 @@
         Main.pref.put("wmsplugin.url." + prefid + ".url", url);
     }
-    public int compareTo(WMSInfo c)
+
+    public int compareTo(WMSInfo in)
     {
-        WMSInfo in = (WMSInfo)c;
         Integer i = name.compareTo(in.name);
         if(i == 0)
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java	(revision 15857)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java	(revision 15858)
@@ -59,4 +59,5 @@
     protected JCheckBoxMenuItem alphaChannel = new JCheckBoxMenuItem(new ToggleAlphaAction());
     protected String baseURL;
+    protected String cookies;
     protected final int serializeFormatVersion = 4;
 
@@ -64,10 +65,10 @@
 
     public WMSLayer() {
-        this(tr("Blank Layer"), null);
+        this(tr("Blank Layer"), null, null);
         initializeImages();
         mv = Main.map.mapView;
     }
 
-    public WMSLayer(String name, String baseURL) {
+    public WMSLayer(String name, String baseURL, String cookies) {
         super(name);
         alphaChannel.setSelected(Main.pref.getBoolean("wmsplugin.alpha_channel"));
@@ -75,4 +76,5 @@
         initializeImages();
         this.baseURL = baseURL;
+        this.cookies = cookies;
         WMSGrabber.getProjection(baseURL, true);
         mv = Main.map.mapView;
@@ -86,5 +88,5 @@
         try {
             executor.shutdown();
-        // Might not be initalized, so catch NullPointer as well
+            // Might not be initalized, so catch NullPointer as well
         } catch(Exception x) {}
     }
@@ -128,13 +130,10 @@
     private Bounds XYtoBounds (int x, int y) {
         return new Bounds(
-            new LatLon( x * ImageSize / pixelPerDegree,
-                         y * ImageSize / pixelPerDegree),
-            new LatLon((x + 1) *  ImageSize / pixelPerDegree,
-                       (y + 1) * ImageSize / pixelPerDegree));
+            new LatLon(      x * ImageSize / pixelPerDegree,       y * ImageSize / pixelPerDegree),
+            new LatLon((x + 1) * ImageSize / pixelPerDegree, (y + 1) * ImageSize / pixelPerDegree));
     }
 
     private int modulo (int a, int b) {
-      if(a%b>=0)return a%b;
-      else return a%b+b;
+        return a % b >= 0 ? a%b : a%b+b;
     }
 
@@ -180,8 +179,8 @@
                     img.image = null;
                     img.flushedResizedCachedInstance();
-                    Grabber gr = WMSPlugin.getGrabber(baseURL, XYtoBounds(x,y), Main.main.proj, pixelPerDegree, img, mv, this);
+                    Grabber gr = WMSPlugin.getGrabber(XYtoBounds(x,y), img, mv, this);
                     executor.submit(gr);
-            }
-        }
+                }
+            }
     }
 
@@ -220,7 +219,7 @@
         for(int x = 0; x<dax; ++x)
             for(int y = 0; y<day; ++y)
-                    if(images[x][y].image!=null && images[x][y].min!=null && images[x][y].max!=null)
-                        if(images[x][y].contains(eastNorth, dx, dy))
-                            return images[x][y];
+                if(images[x][y].image!=null && images[x][y].min!=null && images[x][y].max!=null)
+                    if(images[x][y].contains(eastNorth, dx, dy))
+                        return images[x][y];
         return null;
     }
@@ -294,6 +293,5 @@
         }
         public void actionPerformed(ActionEvent ev) {
-            File f = DiskAccessAction.createAndOpenSaveFileChooser(
-            tr("Save WMS layer"), ".wms");
+            File f = DiskAccessAction.createAndOpenSaveFileChooser(tr("Save WMS layer"), ".wms");
             try
             {
@@ -323,5 +321,5 @@
         public void actionPerformed(ActionEvent ev) {
             JFileChooser fc = DiskAccessAction.createAndOpenFileChooser(true,
-            false, tr("Load WMS layer"));
+                    false, tr("Load WMS layer"));
             if(fc == null) return;
             File f = fc.getSelectedFile();
@@ -334,7 +332,7 @@
                 if (sfv != serializeFormatVersion) {
                     JOptionPane.showMessageDialog(Main.parent,
-                        tr("Unsupported WMS file version; found {0}, expected {1}", sfv, serializeFormatVersion),
-                        tr("File Format Error"),
-                        JOptionPane.ERROR_MESSAGE);
+                            tr("Unsupported WMS file version; found {0}, expected {1}", sfv, serializeFormatVersion),
+                            tr("File Format Error"),
+                            JOptionPane.ERROR_MESSAGE);
                     return;
                 }
@@ -355,7 +353,7 @@
                 ex.printStackTrace(System.out);
                 JOptionPane.showMessageDialog(Main.parent,
-                    tr("Error loading file"),
-                    tr("Error"),
-                    JOptionPane.ERROR_MESSAGE);
+                        tr("Error loading file"),
+                        tr("Error"),
+                        JOptionPane.ERROR_MESSAGE);
                 return;
             }
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPlugin.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPlugin.java	(revision 15857)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPlugin.java	(revision 15858)
@@ -6,28 +6,32 @@
 import java.awt.event.ActionEvent;
 import java.awt.event.KeyEvent;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Map;
+import java.util.TreeMap;
 import java.util.TreeSet;
-import java.util.TreeMap;
-import java.io.*;
-
-import javax.swing.AbstractAction;
-import javax.swing.AbstractButton;
+
 import javax.swing.JMenu;
 import javax.swing.JMenuItem;
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.plugins.Plugin;
+import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.data.Bounds;
+import org.openstreetmap.josm.gui.IconToggleButton;
 import org.openstreetmap.josm.gui.MainMenu;
 import org.openstreetmap.josm.gui.MapFrame;
-import org.openstreetmap.josm.gui.IconToggleButton;
+import org.openstreetmap.josm.gui.MapView;
 import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
 import org.openstreetmap.josm.io.CacheFiles;
 import org.openstreetmap.josm.io.MirroredInputStream;
-import org.openstreetmap.josm.actions.JosmAction;
-import org.openstreetmap.josm.data.Bounds;
-import org.openstreetmap.josm.data.projection.Projection;
-import org.openstreetmap.josm.gui.MapView;
+import org.openstreetmap.josm.plugins.Plugin;
 
 public class WMSPlugin extends Plugin {
@@ -104,4 +108,5 @@
         String name = null;
         String url = null;
+        String cookies = "";
         int lastid = -1;
         for (String key : keys) {
@@ -120,6 +125,8 @@
             else if (elements[3].equals("url"))
                 url = prefs.get(key);
+            else if (elements[3].equals("cookies"))
+                cookies = prefs.get(key);
             if (name != null && url != null)
-                wmsList.add(new WMSInfo(name, url, prefid));
+                wmsList.add(new WMSInfo(name, url, cookies, prefid));
         }
         String source = "http://svn.openstreetmap.org/applications/editors/josm/plugins/wmsplugin/sources.cfg";
@@ -127,5 +134,5 @@
         {
             MirroredInputStream s = new MirroredInputStream(source,
-            Main.pref.getPreferencesDir() + "plugins/wmsplugin/", -1);
+                    Main.pref.getPreferencesDir() + "plugins/wmsplugin/", -1);
             InputStreamReader r;
             try
@@ -200,16 +207,15 @@
     }
 
-    public static Grabber getGrabber(String _baseURL, Bounds _b, Projection _proj,
-                     double _pixelPerDegree, GeorefImage _image, MapView _mv, WMSLayer _layer){
-        if(_baseURL.startsWith("yahoo://"))
-            return new YAHOOGrabber(_baseURL, _b, _proj, _pixelPerDegree, _image, _mv, _layer, cache);
+    // baseURL, XYtoBounds(x,y), Main.main.proj, pixelPerDegree, img, mv, this
+    // Grabber gr = WMSPlugin.getGrabber(XYtoBounds(x,y), img, mv, this);
+    public static Grabber getGrabber(Bounds bounds, GeorefImage img, MapView mv, WMSLayer layer){
+        if(layer.baseURL.startsWith("yahoo://"))
+            return new YAHOOGrabber(bounds, img, mv, layer, cache);
         else
-            return new WMSGrabber(_baseURL, _b, _proj, _pixelPerDegree, _image, _mv, _layer, cache);
+            return new WMSGrabber(bounds, img, mv, layer, cache);
+
         // OSBGrabber should be rewrite for thread support first
-        //if (wmsurl.matches("(?i).*layers=npeoocmap.*") || wmsurl.matches("(?i).*layers=npe.*") ){
+        //if (wmsurl.matches("(?i).*layers=npeoocmap.*") || wmsurl.matches("(?i).*layers=npe.*") )
         //  return new OSGBGrabber(_b, _proj, _pixelPerDegree,  _images, _mv, _layer);
-        //} else {
-        //  return new WMSGrabber(_b, _proj, _pixelPerDegree,  _images, _mv, _layer);
-        //}
     }
 
@@ -220,5 +226,5 @@
             if(item != null) item.setEnabled(isEnabled);
         }
-               menuEnabled = isEnabled;
+        menuEnabled = isEnabled;
     }
 
@@ -227,5 +233,5 @@
             setEnabledAll(true);
             Main.map.addMapMode(new IconToggleButton
-                        (new WMSAdjustAction(Main.map)));
+                    (new WMSAdjustAction(Main.map)));
         } else if (oldFrame!=null && newFrame==null ) {
             setEnabledAll(false);
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/YAHOOGrabber.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/YAHOOGrabber.java	(revision 15857)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/YAHOOGrabber.java	(revision 15858)
@@ -1,10 +1,7 @@
 package wmsplugin;
 
-import static org.openstreetmap.josm.tools.I18n.tr;
-
 import java.awt.image.BufferedImage;
-import java.awt.Image;
+import java.io.IOException;
 import java.net.URL;
-import java.io.IOException;
 import java.text.MessageFormat;
 import java.util.ArrayList;
@@ -13,9 +10,7 @@
 import javax.imageio.ImageIO;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
-import org.openstreetmap.josm.data.projection.Projection;
+import org.openstreetmap.josm.gui.MapView;
 import org.openstreetmap.josm.io.CacheFiles;
-import org.openstreetmap.josm.gui.MapView;
 
 
@@ -23,11 +18,11 @@
     protected String browserCmd;
 
-    YAHOOGrabber(String baseURL, Bounds b, Projection proj,
-            double pixelPerDegree, GeorefImage image, MapView mv, WMSLayer layer, CacheFiles cache) {
-        super("file:///" + WMSPlugin.getPrefsPath() + "ymap.html?"
-        , b, proj, pixelPerDegree, image, mv, layer, cache);
-        this.browserCmd = baseURL.replaceFirst("yahoo://", "");
+    YAHOOGrabber(Bounds b, GeorefImage image, MapView mv, WMSLayer layer, CacheFiles cache) {
+        super(b, image, mv, layer, cache);
+        layer.baseURL = "file:///" + WMSPlugin.getPrefsPath() + "ymap.html?";
+        this.browserCmd = layer.baseURL.replaceFirst("yahoo://", "");
     }
 
+    @Override
     protected BufferedImage grab(URL url) throws IOException {
         String urlstring = url.toExternalForm();
@@ -53,5 +48,5 @@
             throw new IOException( "Could not start browser. Please check that the executable path is correct.\n" + ioe.getMessage() );
         }
-        
+
         BufferedImage img = ImageIO.read(browser.getInputStream());
         cache.saveImg(urlstring, img);
