Index: /applications/editors/josm/plugins/wmsplugin/josm-wmsplugin.launch
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/josm-wmsplugin.launch	(revision 19417)
+++ /applications/editors/josm/plugins/wmsplugin/josm-wmsplugin.launch	(revision 19417)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/JOSM/src/org/openstreetmap/josm/gui/MainApplication.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JDK 5"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.openstreetmap.josm.gui.MainApplication"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="wmsplugin"/>
+</launchConfiguration>
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/GeorefImage.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/GeorefImage.java	(revision 19416)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/GeorefImage.java	(revision 19417)
@@ -1,5 +1,4 @@
 package wmsplugin;
 
-import java.awt.Color;
 import java.awt.Dimension;
 import java.awt.Graphics;
@@ -19,143 +18,134 @@
 
 public class GeorefImage implements Serializable {
-    public BufferedImage image = null;
-    private Image reImg = null;
-    private Dimension reImgHash = new Dimension(0, 0);
-    public EastNorth min, max;
-    public boolean downloadingStarted;
-    public boolean failed = false;
+	public BufferedImage image = null;
+	private Image reImg = null;
+	private Dimension reImgHash = new Dimension(0, 0);
+	public EastNorth min, max;
+	public boolean downloadingStarted;
+	public boolean failed = false;
 
-    public GeorefImage(boolean downloadingStarted) {
-        this.downloadingStarted = downloadingStarted;
-    }
+	public GeorefImage(boolean downloadingStarted) {
+		this.downloadingStarted = downloadingStarted;
+	}
 
-    public boolean contains(EastNorth en, double dx, double dy) {
-        return min.east()+dx <= en.east() && en.east() <= max.east()+dx
-            && min.north()+dy <= en.north() && en.north() <= max.north()+dy;
-    }
+	public boolean contains(EastNorth en, double dx, double dy) {
+		return min.east()+dx <= en.east() && en.east() <= max.east()+dx
+		&& min.north()+dy <= en.north() && en.north() <= max.north()+dy;
+	}
 
-    public boolean isVisible(NavigatableComponent nc, double dx, double dy) {
-        EastNorth mi = new EastNorth(min.east()+dx, min.north()+dy);
-        EastNorth ma = new EastNorth(max.east()+dx, max.north()+dy);
-        Point minPt = nc.getPoint(mi), maxPt = nc.getPoint(ma);
-        Graphics g = nc.getGraphics();
+	public boolean isVisible(NavigatableComponent nc, double dx, double dy) {
+		EastNorth mi = new EastNorth(min.east()+dx, min.north()+dy);
+		EastNorth ma = new EastNorth(max.east()+dx, max.north()+dy);
+		Point minPt = nc.getPoint(mi), maxPt = nc.getPoint(ma);
+		Graphics g = nc.getGraphics();
 
-        return (g.hitClip(minPt.x, maxPt.y,
-                maxPt.x - minPt.x, minPt.y - maxPt.y));
-    }
+		return (g.hitClip(minPt.x, maxPt.y,
+				maxPt.x - minPt.x, minPt.y - maxPt.y));
+	}
 
-    public boolean paint(Graphics g, NavigatableComponent nc, double dx, double dy) {
-        if (image == null || min == null || max == null) return false;
+	public boolean paint(Graphics g, NavigatableComponent nc, double dx, double dy) {
+		if (image == null || min == null || max == null) return false;
 
-        EastNorth mi = new EastNorth(min.east()+dx, min.north()+dy);
-        EastNorth ma = new EastNorth(max.east()+dx, max.north()+dy);
-        Point minPt = nc.getPoint(mi), maxPt = nc.getPoint(ma);
+		EastNorth mi = new EastNorth(min.east()+dx, min.north()+dy);
+		EastNorth ma = new EastNorth(max.east()+dx, max.north()+dy);
+		Point minPt = nc.getPoint(mi), maxPt = nc.getPoint(ma);
 
-        if(!isVisible(nc, dx, dy)){
-            return false;
-        }
+		if(!isVisible(nc, dx, dy)){
+			return false;
+		}
 
-        // Width and height flicker about 2 pixels due to rounding errors, typically only 1
-        int width = Math.abs(maxPt.x-minPt.x);
-        int height = Math.abs(minPt.y-maxPt.y);
-        int diffx, diffy;
-        try {
-            diffx = reImgHash.width - width;
-            diffy = reImgHash.height - height;
-        } catch(Exception e) {
-            reImgHash = new Dimension(0, 0);
-            diffx = 99;
-            diffy = 99;
-        }
-        // This happens if you zoom outside the world
-        if(width == 0 || height == 0)
-            return false;
+		// Width and height flicker about 2 pixels due to rounding errors, typically only 1
+		int width = Math.abs(maxPt.x-minPt.x);
+		int height = Math.abs(minPt.y-maxPt.y);
+		int diffx, diffy;
 
-        // We still need to re-render if the requested size is larger (otherwise we'll have black lines)
-        // If it's only up to two pixels smaller, just draw the old image, the errors are minimal
-        // but the performance improvements when moving are huge
-        // Zooming is still slow because the images need to be resized
-        if(diffx >= 0 && diffx <= 2 && diffy >= 0 && diffy <= 2 && reImg != null) {
-            /*g.setColor(Color.RED);
+		diffx = reImgHash.width - width;
+		diffy = reImgHash.height - height;
+		// This happens if you zoom outside the world
+		if(width == 0 || height == 0)
+			return false;
+
+		// We still need to re-render if the requested size is larger (otherwise we'll have black lines)
+		// If it's only up to two pixels smaller, just draw the old image, the errors are minimal
+		// but the performance improvements when moving are huge
+		// Zooming is still slow because the images need to be resized
+		if(diffx >= 0 && diffx <= 2 && diffy >= 0 && diffy <= 2 && reImg != null) {
+			/*g.setColor(Color.RED);
               g.drawRect(minPt.x, minPt.y-height, width, height);*/
-            g.drawImage(reImg, minPt.x, maxPt.y, null);
-            return true;
-        }
+			g.drawImage(reImg, minPt.x, maxPt.y, null);
+			return true;
+		}
 
-        boolean alphaChannel = Main.pref.getBoolean("wmsplugin.alpha_channel");
+		boolean alphaChannel = Main.pref.getBoolean("wmsplugin.alpha_channel");
 
-        try {
-            if(reImg != null) reImg.flush();
-            long freeMem = Runtime.getRuntime().maxMemory() - Runtime.getRuntime().totalMemory();
-            //System.out.println("Free Memory:           "+ (freeMem/1024/1024) +" MB");
-            // Notice that this value can get negative due to integer overflows
-            //System.out.println("Img Size:              "+ (width*height*3/1024/1024) +" MB");
+		try {
+			if(reImg != null) reImg.flush();
+			long freeMem = Runtime.getRuntime().maxMemory() - Runtime.getRuntime().totalMemory();
+			//System.out.println("Free Memory:           "+ (freeMem/1024/1024) +" MB");
+			// Notice that this value can get negative due to integer overflows
+			//System.out.println("Img Size:              "+ (width*height*3/1024/1024) +" MB");
 
-            int multipl = alphaChannel ? 4 : 3;
-            // This happens when requesting images while zoomed out and then zooming in
-            // Storing images this large in memory will certainly hang up JOSM. Luckily
-            // traditional rendering is as fast at these zoom levels, so it's no loss.
-            // Also prevent caching if we're out of memory soon
-            if(width > 2000 || height > 2000 || width*height*multipl > freeMem) {
-                fallbackDraw(g, image, minPt, maxPt);
-            } else {
-                // We haven't got a saved resized copy, so resize and cache it
-                reImg = new BufferedImage(width, height,
-                    alphaChannel
-                        ? BufferedImage.TYPE_INT_ARGB
-                        : BufferedImage.TYPE_3BYTE_BGR  // This removes alpha
-                    );
-                reImg.getGraphics().drawImage(image,
-                    0, 0, width, height, // dest
-                    0, 0, image.getWidth(null), image.getHeight(null), // src
-                    null);
-                reImg.getGraphics().dispose();
+			int multipl = alphaChannel ? 4 : 3;
+			// This happens when requesting images while zoomed out and then zooming in
+			// Storing images this large in memory will certainly hang up JOSM. Luckily
+			// traditional rendering is as fast at these zoom levels, so it's no loss.
+			// Also prevent caching if we're out of memory soon
+			if(width > 2000 || height > 2000 || width*height*multipl > freeMem) {
+				fallbackDraw(g, image, minPt, maxPt);
+			} else {
+				// We haven't got a saved resized copy, so resize and cache it
+				reImg = new BufferedImage(width, height, alphaChannel?BufferedImage.TYPE_INT_ARGB:BufferedImage.TYPE_3BYTE_BGR);
+				reImg.getGraphics().drawImage(image,
+						0, 0, width, height, // dest
+						0, 0, image.getWidth(null), image.getHeight(null), // src
+						null);
+				reImg.getGraphics().dispose();
 
-                reImgHash.setSize(width, height);
-                /*g.setColor(Color.RED);
+				reImgHash.setSize(width, height);
+				/*g.setColor(Color.RED);
                   g.drawRect(minPt.x, minPt.y-height, width, height);*/
-                g.drawImage(reImg, minPt.x, maxPt.y, null);
-            }
-        } catch(Exception e) {
-            fallbackDraw(g, image, minPt, maxPt);
-        }
-        return true;
-    }
+				g.drawImage(reImg, minPt.x, maxPt.y, null);
+			}
+		} catch(Exception e) {
+			fallbackDraw(g, image, minPt, maxPt);
+		}
+		return true;
+	}
 
-    private void fallbackDraw(Graphics g, Image img, Point min, Point max) {
-        if(reImg != null) reImg.flush();
-        reImg = null;
-        g.drawImage(img,
-            min.x, max.y, max.x, min.y, // dest
-            0, 0, img.getWidth(null), img.getHeight(null), // src
-            null);
-    }
+	private void fallbackDraw(Graphics g, Image img, Point min, Point max) {
+		if(reImg != null) reImg.flush();
+		reImg = null;
+		g.drawImage(img,
+				min.x, max.y, max.x, min.y, // dest
+				0, 0, img.getWidth(null), img.getHeight(null), // src
+				null);
+	}
 
-    private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
-        max = (EastNorth) in.readObject();
-        min = (EastNorth) in.readObject();
-        boolean hasImage = in.readBoolean();
-        if (hasImage)
-            image = (BufferedImage) ImageIO.read(ImageIO.createImageInputStream(in));
-        else {
-            in.readObject(); // read null from input stream
-            image = null;
-        }
-    }
+	private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
+		max = (EastNorth) in.readObject();
+		min = (EastNorth) in.readObject();
+		boolean hasImage = in.readBoolean();
+		if (hasImage)
+			image = ImageIO.read(ImageIO.createImageInputStream(in));
+		else {
+			in.readObject(); // read null from input stream
+			image = null;
+		}
+	}
 
-    private void writeObject(ObjectOutputStream out) throws IOException {
-        out.writeObject(max);
-        out.writeObject(min);
-        if(image == null) {
-            out.writeBoolean(false);
-            out.writeObject(null);
-        } else {
-            out.writeBoolean(true);
-            ImageIO.write(image, "png", ImageIO.createImageOutputStream(out));
-        }
-    }
+	private void writeObject(ObjectOutputStream out) throws IOException {
+		out.writeObject(max);
+		out.writeObject(min);
+		if(image == null) {
+			out.writeBoolean(false);
+			out.writeObject(null);
+		} else {
+			out.writeBoolean(true);
+			ImageIO.write(image, "png", ImageIO.createImageOutputStream(out));
+		}
+	}
 
-    public void flushedResizedCachedInstance() {
-        reImg = null;
-    }
+	public void flushedResizedCachedInstance() {
+		reImg = null;
+	}
 }
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Map_Rectifier_WMSmenuAction.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Map_Rectifier_WMSmenuAction.java	(revision 19416)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/Map_Rectifier_WMSmenuAction.java	(revision 19417)
@@ -3,4 +3,5 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
+import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
 import java.awt.Toolkit;
@@ -31,5 +32,5 @@
      * Class that bundles all required information of a rectifier service
      */
-    public class rectifierService {
+    public static class RectifierService {
         private final String name;
         private final String url;
@@ -45,5 +46,5 @@
          * @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) {
+        public RectifierService(String name, String url, String wmsUrl, String urlRegEx, String idValidator) {
             this.name = name;
             this.url = url;
@@ -61,5 +62,5 @@
      * List of available rectifier services. May be extended from the outside
      */
-    public ArrayList<rectifierService> services = new ArrayList<rectifierService>();
+    public ArrayList<RectifierService> services = new ArrayList<RectifierService>();
 
     public Map_Rectifier_WMSmenuAction() {
@@ -76,5 +77,5 @@
         // Add default services
         services.add(
-            new rectifierService("Metacarta Map Rectifier",
+            new RectifierService("Metacarta Map Rectifier",
                 "http://labs.metacarta.com/rectifier/",
                 "http://labs.metacarta.com/rectifier/wms.cgi?id=__s__&srs=EPSG:4326"
@@ -89,5 +90,5 @@
             // The RegEx already matches the new URL and old URLs will be forwarded
             // to make the transition as smooth as possible for the users
-            new rectifierService("Geothings Map Warper",
+            new RectifierService("Geothings Map Warper",
                 "http://warper.geothings.net/",
                 "http://warper.geothings.net/maps/wms/__s__?request=GetMap&version=1.1.1"
@@ -104,5 +105,5 @@
         // Clipboard content gets trimmed, so matching whitespace only ensures that this
         // service will never be selected automatically.
-        services.add(new rectifierService(tr("Custom WMS Link"), "", "", "^\\s+$", ""));
+        services.add(new RectifierService(tr("Custom WMS Link"), "", "", "^\\s+$", ""));
     }
 
@@ -117,5 +118,5 @@
 
         JRadioButton firstBtn = null;
-        for(rectifierService s : services) {
+        for(RectifierService s : services) {
             JRadioButton serviceBtn = new JRadioButton(s.name);
             if(firstBtn == null)
@@ -133,7 +134,7 @@
             if(!s.url.equals("")) {
                 panel.add(serviceBtn, GBC.std());
-                panel.add(new UrlLabel(s.url, tr("Visit Homepage")), GBC.eol().anchor(GBC.EAST));
+                panel.add(new UrlLabel(s.url, tr("Visit Homepage")), GBC.eol().anchor(GridBagConstraints.EAST));
             } else
-                panel.add(serviceBtn, GBC.eol().anchor(GBC.WEST));
+                panel.add(serviceBtn, GBC.eol().anchor(GridBagConstraints.WEST));
         }
 
@@ -143,5 +144,5 @@
 
         panel.add(new JLabel(tr("WMS URL or Image ID:")), GBC.eol());
-        panel.add(tfWmsUrl, GBC.eol().fill(GBC.HORIZONTAL));
+        panel.add(tfWmsUrl, GBC.eol().fill(GridBagConstraints.HORIZONTAL));
 
         ExtendedDialog diag = new ExtendedDialog(Main.parent,
@@ -163,5 +164,5 @@
             String text = tfWmsUrl.getText().trim();
             // Loop all services until we find the selected one
-            for(rectifierService s : services) {
+            for(RectifierService s : services) {
                 if(!s.isSelected())
                     continue;
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSAdjustAction.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSAdjustAction.java	(revision 19416)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSAdjustAction.java	(revision 19417)
@@ -10,5 +10,4 @@
 import java.awt.event.MouseMotionListener;
 import java.util.List;
-import java.util.logging.Logger;
 
 import javax.swing.DefaultComboBoxModel;
@@ -32,6 +31,6 @@
 
 public class WMSAdjustAction extends MapMode implements MouseListener, MouseMotionListener{
-    static private final Logger logger = Logger.getLogger(WMSAdjustAction.class.getName());
-    
+    //static private final Logger logger = Logger.getLogger(WMSAdjustAction.class.getName());
+
     GeorefImage selectedImage;
     boolean mouseDown;
@@ -45,8 +44,8 @@
     }
 
-    
-    
+
+
     @Override public void enterMode() {
-        super.enterMode();       
+        super.enterMode();
         if (!hasWMSLayersToAdjust()) {
             warnNoWMSLayers();
@@ -108,13 +107,13 @@
         prevEastNorth = null;
     }
-    
+
     @Override
     public void mouseEntered(MouseEvent e) {
     }
-    
+
     @Override
     public void mouseExited(MouseEvent e) {
     }
-    
+
     @Override
     public void mouseMoved(MouseEvent e) {
@@ -129,8 +128,8 @@
         return (l instanceof WMSLayer) && l.isVisible();
     }
-    
+
     /**
     * the list cell renderer used to render layer list entries
-    * 
+    *
     */
    static public class LayerListCellRenderer extends DefaultListCellRenderer {
@@ -158,8 +157,8 @@
 
    /**
-    * Prompts the user with a list of WMS layers which can be adjusted  
-    * 
-    * @param adjustableLayers the list of adjustable layers 
-    * @return  the selected layer; null, if no layer was selected 
+    * Prompts the user with a list of WMS layers which can be adjusted
+    *
+    * @param adjustableLayers the list of adjustable layers
+    * @return  the selected layer; null, if no layer was selected
     */
    protected Layer askAdjustLayer(List<? extends Layer> adjustableLayers) {
@@ -168,13 +167,13 @@
        layerList.setModel(new DefaultComboBoxModel(adjustableLayers.toArray()));
        layerList.setSelectedIndex(0);
-   
+
        JPanel pnl = new JPanel();
        pnl.setLayout(new GridBagLayout());
        pnl.add(new JLabel(tr("Please select the WMS layer to adjust.")), GBC.eol());
        pnl.add(layerList, GBC.eol());
-   
+
        ExtendedDialog diag = new ExtendedDialog(
-               Main.parent, 
-               tr("Select WMS layer"), 
+               Main.parent,
+               tr("Select WMS layer"),
                new String[] { tr("Start adjusting"),tr("Cancel") }
                );
@@ -190,6 +189,6 @@
 
    /**
-    * Displays a warning message if there are no WMS layers to adjust 
-    * 
+    * Displays a warning message if there are no WMS layers to adjust
+    *
     */
    protected void warnNoWMSLayers() {
@@ -197,12 +196,12 @@
                Main.parent,
                tr("There are currently no WMS layer to adjust."),
-               tr("No layers to adjust"), 
+               tr("No layers to adjust"),
                JOptionPane.WARNING_MESSAGE
        );
    }
-   
+
    /**
-    * Replies true if there is at least one WMS layer 
-    * 
+    * Replies true if there is at least one WMS layer
+    *
     * @return true if there is at least one WMS layer
     */
@@ -216,4 +215,4 @@
     protected void updateEnabledState() {
         setEnabled(hasWMSLayersToAdjust());
-    }   
+    }
 }
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java	(revision 19416)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSGrabber.java	(revision 19417)
@@ -37,5 +37,5 @@
         return url != null && url.contains("{") && url.contains("}");
     }
-    
+
     protected String baseURL;
     private final boolean urlWithPatterns;
@@ -48,5 +48,6 @@
     }
 
-    public void run() {
+    @Override
+	public void run() {
         attempt();
         mv.repaint();
@@ -152,5 +153,6 @@
     }
 
-    public boolean loadFromCache(){
+    @Override
+	public boolean loadFromCache(){
         URL url = null;
         try{
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSInfo.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSInfo.java	(revision 19416)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSInfo.java	(revision 19417)
@@ -33,5 +33,5 @@
     public int compareTo(WMSInfo in)
     {
-        Integer i = name.compareTo(in.name);
+        int i = name.compareTo(in.name);
         if(i == 0)
             i = url.compareTo(in.url);
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java	(revision 19416)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java	(revision 19417)
@@ -51,5 +51,5 @@
     protected String resolution;
     protected boolean stopAfterPaint = false;
-    protected int ImageSize = 500;
+    protected int imageSize = 500;
     protected int dax = 10;
     protected int day = 10;
@@ -168,6 +168,6 @@
     private ProjectionBounds XYtoBounds (int x, int y) {
         return new ProjectionBounds(
-                new EastNorth(      x * ImageSize / pixelPerDegree,       y * ImageSize / pixelPerDegree),
-                new EastNorth((x + 1) * ImageSize / pixelPerDegree, (y + 1) * ImageSize / pixelPerDegree));
+                new EastNorth(      x * imageSize / pixelPerDegree,       y * imageSize / pixelPerDegree),
+                new EastNorth((x + 1) * imageSize / pixelPerDegree, (y + 1) * imageSize / pixelPerDegree));
     }
 
@@ -228,8 +228,8 @@
             return;
         ProjectionBounds bounds = mv.getProjectionBounds();
-        int bminx= (int)Math.floor (((bounds.min.east() - dx) * pixelPerDegree) / ImageSize );
-        int bminy= (int)Math.floor (((bounds.min.north() - dy) * pixelPerDegree) / ImageSize );
-        int bmaxx= (int)Math.ceil  (((bounds.max.east() - dx) * pixelPerDegree) / ImageSize );
-        int bmaxy= (int)Math.ceil  (((bounds.max.north() - dy) * pixelPerDegree) / ImageSize );
+        int bminx= (int)Math.floor (((bounds.min.east() - dx) * pixelPerDegree) / imageSize );
+        int bminy= (int)Math.floor (((bounds.min.north() - dy) * pixelPerDegree) / imageSize );
+        int bmaxx= (int)Math.ceil  (((bounds.max.east() - dx) * pixelPerDegree) / imageSize );
+        int bmaxy= (int)Math.ceil  (((bounds.max.north() - dy) * pixelPerDegree) / imageSize );
 
         if((bmaxx - bminx > dax) || (bmaxy - bminy > day)){
@@ -385,5 +385,5 @@
                     oos.writeInt(dax);
                     oos.writeInt(day);
-                    oos.writeInt(ImageSize);
+                    oos.writeInt(imageSize);
                     oos.writeDouble(pixelPerDegree);
                     oos.writeObject(getName());
@@ -423,5 +423,5 @@
                 dax = ois.readInt();
                 day = ois.readInt();
-                ImageSize = ois.readInt();
+                imageSize = ois.readInt();
                 pixelPerDegree = ois.readDouble();
                 setName((String)ois.readObject());
Index: /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java
===================================================================
--- /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java	(revision 19416)
+++ /applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSPreferenceEditor.java	(revision 19417)
@@ -1,14 +1,9 @@
 package wmsplugin;
 
-import java.awt.BorderLayout;
-import java.awt.FlowLayout;
-import javax.swing.JCheckBox;
-import javax.swing.JSpinner;
-import javax.swing.SpinnerNumberModel;
-import org.openstreetmap.josm.Main;
 import static org.openstreetmap.josm.tools.I18n.tr;
 
 import java.awt.Dimension;
 import java.awt.FlowLayout;
+import java.awt.GridBagConstraints;
 import java.awt.GridBagLayout;
 import java.awt.event.ActionEvent;
@@ -19,4 +14,5 @@
 import javax.swing.Box;
 import javax.swing.JButton;
+import javax.swing.JCheckBox;
 import javax.swing.JComboBox;
 import javax.swing.JLabel;
@@ -24,10 +20,11 @@
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
+import javax.swing.JSpinner;
 import javax.swing.JTable;
 import javax.swing.JTextField;
+import javax.swing.SpinnerNumberModel;
 import javax.swing.table.DefaultTableModel;
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.gui.preferences.PreferenceDialog;
 import org.openstreetmap.josm.gui.preferences.PreferenceSetting;
 import org.openstreetmap.josm.gui.preferences.PreferenceTabbedPane;
@@ -42,5 +39,5 @@
     JSpinner spinEast;
     JSpinner spinNorth;
-    
+
     public void addGui(final PreferenceTabbedPane gui) {
         JPanel p = gui.createPreferenceTab("wms", tr("WMS Plugin Preferences"), tr("Modify list of WMS servers displayed in the WMS plugin menu"));
@@ -49,5 +46,5 @@
         final JTable list = new JTable(model);
         JScrollPane scroll = new JScrollPane(list);
-        p.add(scroll, GBC.eol().fill(GBC.BOTH));
+        p.add(scroll, GBC.eol().fill(GridBagConstraints.BOTH));
         scroll.setPreferredSize(new Dimension(200,200));
 
@@ -82,10 +79,10 @@
                 JTextField key = new JTextField(40);
                 JTextField value = new JTextField(40);
-                p.add(key, GBC.eop().insets(5,0,0,0).fill(GBC.HORIZONTAL));
+                p.add(key, GBC.eop().insets(5,0,0,0).fill(GridBagConstraints.HORIZONTAL));
                 p.add(new JLabel(tr("WMS URL")), GBC.std().insets(0,0,5,0));
-                p.add(value, GBC.eol().insets(5,0,0,0).fill(GBC.HORIZONTAL));
+                p.add(value, GBC.eol().insets(5,0,0,0).fill(GridBagConstraints.HORIZONTAL));
                 int answer = JOptionPane.showConfirmDialog(
-                        gui, p, 
-                        tr("Enter a menu name and WMS URL"), 
+                        gui, p,
+                        tr("Enter a menu name and WMS URL"),
                         JOptionPane.OK_CANCEL_OPTION,
                         JOptionPane.QUESTION_MESSAGE);
@@ -118,5 +115,5 @@
                 if (lines.length == 0) {
                     JOptionPane.showMessageDialog(
-                            gui, 
+                            gui,
                             tr("Please select at least one row to copy."),
                             tr("Information"),
@@ -125,13 +122,13 @@
                     return;
                 }
-                
+
                 outer: for(int i = 0; i < lines.length; i++) {
                     String c1 = modeldef.getValueAt(lines[i], 0).toString();
                     String c2 = modeldef.getValueAt(lines[i], 1).toString();
-                    
+
                     // Check if an entry with exactly the same values already
                     // exists
                     for(int j = 0; j < model.getRowCount(); j++) {
-                        if(c1.equals(model.getValueAt(j, 0).toString()) 
+                        if(c1.equals(model.getValueAt(j, 0).toString())
                                 && c2.equals(model.getValueAt(j, 1).toString())) {
                             // Select the already existing row so the user has
@@ -142,5 +139,5 @@
                         }
                     }
-                    
+
                     model.addRow(new String[] {c1, c2});
                     int lastLine = model.getRowCount() - 1;
@@ -152,8 +149,8 @@
 
         p.add(buttonPanel);
-        p.add(Box.createHorizontalGlue(), GBC.eol().fill(GBC.HORIZONTAL));
+        p.add(Box.createHorizontalGlue(), GBC.eol().fill(GridBagConstraints.HORIZONTAL));
         // Add default item list
-        p.add(scrolldef, GBC.eol().insets(0,5,0,0).fill(GBC.BOTH));       
-        
+        p.add(scrolldef, GBC.eol().insets(0,5,0,0).fill(GridBagConstraints.BOTH));
+
         browser = new JComboBox(new String[]{
         "webkit-image {0}",
@@ -163,25 +160,25 @@
         browser.setEditable(true);
         browser.setSelectedItem(Main.pref.get("wmsplugin.browser", "webkit-image {0}"));
-        p.add(new JLabel(tr("Downloader:")), GBC.eol().fill(GBC.HORIZONTAL));
+        p.add(new JLabel(tr("Downloader:")), GBC.eol().fill(GridBagConstraints.HORIZONTAL));
         p.add(browser);
 
 
         //Overlap
-        p.add(Box.createHorizontalGlue(), GBC.eol().fill(GBC.HORIZONTAL)); 
-         
-        overlapCheckBox = new JCheckBox(tr("Overlap tiles"), WMSPlugin.doOverlap ); 
-        JLabel labelEast = new JLabel(tr("% of east:")); 
-        JLabel labelNorth = new JLabel(tr("% of north:")); 
-        spinEast = new JSpinner(new SpinnerNumberModel(WMSPlugin.overlapEast, 1, 50, 1)); 
-        spinNorth = new JSpinner(new SpinnerNumberModel(WMSPlugin.overlapNorth, 1, 50, 1)); 
-         
-        JPanel overlapPanel = new JPanel(new FlowLayout()); 
-        overlapPanel.add(overlapCheckBox); 
-        overlapPanel.add(labelEast); 
-        overlapPanel.add(spinEast); 
-        overlapPanel.add(labelNorth); 
-        overlapPanel.add(spinNorth); 
-         
-        p.add(overlapPanel);    
+        p.add(Box.createHorizontalGlue(), GBC.eol().fill(GridBagConstraints.HORIZONTAL));
+
+        overlapCheckBox = new JCheckBox(tr("Overlap tiles"), WMSPlugin.doOverlap );
+        JLabel labelEast = new JLabel(tr("% of east:"));
+        JLabel labelNorth = new JLabel(tr("% of north:"));
+        spinEast = new JSpinner(new SpinnerNumberModel(WMSPlugin.overlapEast, 1, 50, 1));
+        spinNorth = new JSpinner(new SpinnerNumberModel(WMSPlugin.overlapNorth, 1, 50, 1));
+
+        JPanel overlapPanel = new JPanel(new FlowLayout());
+        overlapPanel.add(overlapCheckBox);
+        overlapPanel.add(labelEast);
+        overlapPanel.add(spinEast);
+        overlapPanel.add(labelNorth);
+        overlapPanel.add(spinNorth);
+
+        p.add(overlapPanel);
     }
 
@@ -223,11 +220,11 @@
         if (change) WMSPlugin.refreshMenu();
 
-        WMSPlugin.doOverlap = overlapCheckBox.getModel().isSelected(); 
-        WMSPlugin.overlapEast = (Integer) spinEast.getModel().getValue(); 
-        WMSPlugin.overlapNorth = (Integer) spinNorth.getModel().getValue(); 
-         
-        Main.pref.put("wmsplugin.url.overlap",    String.valueOf(WMSPlugin.doOverlap)); 
-        Main.pref.put("wmsplugin.url.overlapEast", String.valueOf(WMSPlugin.overlapEast)); 
-        Main.pref.put("wmsplugin.url.overlapNorth", String.valueOf(WMSPlugin.overlapNorth)); 
+        WMSPlugin.doOverlap = overlapCheckBox.getModel().isSelected();
+        WMSPlugin.overlapEast = (Integer) spinEast.getModel().getValue();
+        WMSPlugin.overlapNorth = (Integer) spinNorth.getModel().getValue();
+
+        Main.pref.put("wmsplugin.url.overlap",    String.valueOf(WMSPlugin.doOverlap));
+        Main.pref.put("wmsplugin.url.overlapEast", String.valueOf(WMSPlugin.overlapEast));
+        Main.pref.put("wmsplugin.url.overlapNorth", String.valueOf(WMSPlugin.overlapNorth));
 
         Main.pref.put("wmsplugin.browser", browser.getEditor().getItem().toString());
