Index: applications/editors/josm/plugins/canvec_helper/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- applications/editors/josm/plugins/canvec_helper/.settings/org.eclipse.jdt.core.prefs	(revision 30756)
+++ applications/editors/josm/plugins/canvec_helper/.settings/org.eclipse.jdt.core.prefs	(revision 30757)
@@ -7,6 +7,12 @@
 org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
 org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
@@ -32,4 +38,9 @@
 org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
 org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
@@ -38,4 +49,12 @@
 org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
 org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
Index: applications/editors/josm/plugins/canvec_helper/README.template
===================================================================
--- applications/editors/josm/plugins/canvec_helper/README.template	(revision 30756)
+++ 	(revision )
@@ -1,78 +1,0 @@
-README 
-======
-
-This is a template project structure for a JOSM plugin.
-
-Layout
-======
-+--- src                                source of your plugin
-  |- images                             images your plugin needs
-  |- resources                          resources your plugin needs
-
-  README                                README for your plugin
-
-  GPL-v2.0.txt                          GPL version 2 license text
-  GPL-v3.0.txt                          GPL version 3 license text
-  
-  README.template                       this file 
-  
-  
-Build
-=====  
-A JOSM plugin is built as a single jar. We use ant to build.
-
-See build.xml in this directory and update the plugin specific properties in the
-configuration section.
-  
-
-Maintaining versions
-====================
-There are two versions maintained with each plugin:
-   1) the main version
-      This is the lowest JOSM version required by this plugin.
-      You have to manually set the plugins main version in the build script.
-      Set the property plugin.main.version in build.xml accordingly. 
-
-   2) the build version
-      The build version is unique for every build of the plugin. It is equal
-      to the SVN revision of your plugin directory. 
-
- Both the main version and the build version are included in properties of the plugins
- manifest:
-    Plugin-Version      the build version
-    Plugin-Mainversion  the main version
-
- JOSM automatically detects whether a plugin needs to be upgraded. It compares the build
- version of the currently installed plugin jar with the build version of the plugin jar in 
- the SVN. The main version is irrelevant for this process.  
- 
- Making your plugin available to JOSM users
- ===========================================
- When a plugin jar is checked into SVN a script updates the plugins list on the JOSM wiki:
-   http://josm.openstreetmap.de/wiki/Plugins
- JOSM retrieves the list of available plugins and their build versions from this list.
-
-            commit      publish               read
-                       meta data              meta data 
-      Build  ==>  SVN  =======>  JOSM Wiki   <======= JOSM 
-                   ^ 
-                   ==================================
-                            fetch current plugin jar 
- 
- Note that you have to manually publish (commit) your plugin jar. There is no nightly build
- in place. Everything else (pulishing meta data, updating plugins in the client) is then handled 
- by automatic processes. 
-
-See also
-========
-* Developing Plugins 
-  http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
-  
-* List of JOSM Plugins
-  http://josm.openstreetmap.de/wiki/Plugins
-  
-  
- 
-     
-
- 
Index: applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanVecTile.java
===================================================================
--- applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanVecTile.java	(revision 30756)
+++ applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanVecTile.java	(revision 30757)
@@ -1,17 +1,23 @@
+// License: GPL
 package org.openstreetmap.josm.plugins.canvec_helper;
 
 import java.util.ArrayList;
 import java.util.Enumeration;
+import java.util.List;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 import java.util.regex.Pattern;
 import java.util.regex.Matcher;
+
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.data.Bounds;
+
 import java.awt.Point;
+
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.gui.MapView;
 import org.openstreetmap.josm.io.IllegalDataException;
 import org.openstreetmap.josm.io.CachedFile;
+
 import java.awt.Graphics2D;
 import java.awt.Polygon;
@@ -19,25 +25,28 @@
 import java.io.IOException;
 import java.io.InputStream;
+
 import org.openstreetmap.josm.io.OsmImporter;
 import org.openstreetmap.josm.io.OsmImporter.OsmImporterData;
 
-public class CanVecTile {
-    CanvecLayer layer;
-    public boolean can_download = false;
-    private ArrayList<String> sub_tile_ids = new ArrayList<>();
-    private boolean zip_scanned = false;
+class CanVecTile {
+    private CanvecLayer layer;
+    boolean canDownload = false;
+    private List<String> subTileIds = new ArrayList<>();
+    private boolean zipScanned = false;
     
-    private ArrayList<CanVecTile> sub_tiles = new ArrayList<>();
-    private boolean sub_tiles_made = false;
-
-    private ArrayList<String> index;
+    private List<CanVecTile> subTiles = new ArrayList<>();
+    private boolean subTilesMade = false;
+
+    private List<String> index;
     private int depth;
     
-    int corda,cordc;
+    private int corda;
+    private int cordc;
     private boolean valid = false;
-    String cordb,cordd;
+    private String cordb;
+    private String cordd;
     private Bounds bounds;
-    public String tileid;
-    public CanVecTile(String tileid,CanvecLayer layer) {
+    String tileid;
+    CanVecTile(String tileid, CanvecLayer layer) {
         String parta,partb,partc,partd;
         parta = tileid.substring(0,3);
@@ -48,10 +57,10 @@
         a = Integer.parseInt(parta);
         c = Integer.parseInt(partc);
-        real_init(a,partb,c,partd,layer,new ArrayList<String>());
-    }
-    public CanVecTile(int a,String b,int c,String d,CanvecLayer layer,ArrayList<String> index) {
-        real_init(a,b,c,d,layer,index);
-    }
-    public void real_init(int a,String b,int c,String d,CanvecLayer layer, ArrayList<String> index) {
+        realInit(a,partb,c,partd,layer,new ArrayList<String>());
+    }
+    CanVecTile(int a,String b,int c,String d,CanvecLayer layer, List<String> index) {
+        realInit(a,b,c,d,layer,index);
+    }
+    private void realInit(int a,String b,int c,String d,CanvecLayer layer, List<String> index) {
         this.index = index;
         this.layer = layer;
@@ -60,7 +69,7 @@
         cordc = c;
         cordd = d;
-        double zero_point_lat,zero_point_lon;
-        double lat_span,lon_span;
-        double lat2,lon2;
+        double zeroPointLat, zeroPointLon;
+        double latSpan, lonSpan;
+        double lat2, lon2;
         if ((a >= 0) && (a <= 119)) { // main block of tiles
             int column = a / 10;
@@ -70,12 +79,12 @@
                 return;
             }
-            zero_point_lat = 40 + 4 * row;
-            zero_point_lon = -56 - 8 * column;
+            zeroPointLat = 40 + 4 * row;
+            zeroPointLon = -56 - 8 * column;
         
             // size of each grid
             if (row <= 6) {
                 // each is 4x8 degrees, broken into a 4x4 grid
-                lat_span = 4;
-                lon_span = 8;
+                latSpan = 4;
+                lonSpan = 8;
                 depth = 1;
             } else {
@@ -89,37 +98,35 @@
         // map A-P to 1-16
         int grid2;
-        if (b == "") grid2 = 0;
+        if (b.isEmpty()) grid2 = 0;
         else grid2 = b.charAt(0) - 64;
-        int rows1[] = { 0, 0,0,0,0, 1,1,1,1, 2,2,2,2, 3,3,3,3 };
-        int cols1[] = { 0, 3,2,1,0, 0,1,2,3, 3,2,1,0, 0,1,2,3 };
-        lat2 = zero_point_lat + (lat_span/4)*rows1[grid2];
-        lon2 = zero_point_lon + (lon_span/4)*cols1[grid2];
+        int[] rows1 = { 0, 0,0,0,0, 1,1,1,1, 2,2,2,2, 3,3,3,3 };
+        int[] cols1 = { 0, 3,2,1,0, 0,1,2,3, 3,2,1,0, 0,1,2,3 };
+        lat2 = zeroPointLat + (latSpan/4)*rows1[grid2];
+        lon2 = zeroPointLon + (lonSpan/4)*cols1[grid2];
 
         if (grid2 != 0) {
-            lat_span = lat_span / 4;
-            lon_span = lon_span / 4;
+            latSpan = latSpan / 4;
+            lonSpan = lonSpan / 4;
             depth = 2;
         }
 
-        int rows3[] = { 0, 0,0,0,0, 1,1,1,1, 2,2,2,2, 3,3,3,3 };
-        lat2 = lat2 + (lat_span/4)*rows3[c];
-        int cols3[] = { 0, 3,2,1,0, 0,1,2,3, 3,2,1,0, 0,1,2,3 };
-        lon2 = lon2 + (lon_span/4)*cols3[c];
+        int[] rows3 = { 0, 0,0,0,0, 1,1,1,1, 2,2,2,2, 3,3,3,3 };
+        lat2 = lat2 + (latSpan/4)*rows3[c];
+        int[] cols3 = { 0, 3,2,1,0, 0,1,2,3, 3,2,1,0, 0,1,2,3 };
+        lon2 = lon2 + (lonSpan/4)*cols3[c];
 
         if (c != 0) {
-            lat_span = lat_span / 4;
-            lon_span = lon_span / 4;
+            latSpan = latSpan / 4;
+            lonSpan = lonSpan / 4;
             depth = 3;
         }
         
-        if (cordd != "") {
+        if (!cordd.isEmpty()) {
             depth = 4;
-            System.out.println("cordd: "+cordd);
-            String foo[] = cordd.split("\\.");
+            String[] foo = cordd.split("\\.");
             for (int i = 0; i < foo.length; i++) {
                 int cell;
-                System.out.println(foo[i]);
-                if (foo[i] == "osm") break;
-                if (foo[i] == "") continue;
+                if ("osm".equals(foo[i])) break;
+                if (foo[i].isEmpty()) continue;
                 try {
                     cell = Integer.parseInt(foo[i]);
@@ -131,39 +138,36 @@
                     break;
                 case 1:
-                    lat2 = lat2 + lat_span/2;
+                    lat2 = lat2 + latSpan/2;
                     break;
                 case 2:
-                    lat2 = lat2 + lat_span/2;
-                    lon2 = lon2 + lon_span/2;
+                    lat2 = lat2 + latSpan/2;
+                    lon2 = lon2 + lonSpan/2;
                     break;
                 case 3:
-                    lon2 = lon2 + lon_span/2;
+                    lon2 = lon2 + lonSpan/2;
                     break;
                 }
-                lat_span = lat_span/2;
-                lon_span = lon_span/2;
-            }
-        }
-
-        bounds = new Bounds(lat2,lon2,lat2+lat_span,lon2+lon_span);
-        if (cordb == "") this.tileid = String.format("%03d",corda);
+                latSpan = latSpan/2;
+                lonSpan = lonSpan/2;
+            }
+        }
+
+        bounds = new Bounds(lat2,lon2,lat2+latSpan,lon2+lonSpan);
+        if (cordb.isEmpty()) this.tileid = String.format("%03d",corda);
         else if (cordc == 0) this.tileid = String.format("%03d%s",corda,cordb);
-        else if (cordd == "") this.tileid = String.format("%03d%s%02d",corda,cordb,cordc);
+        else if (cordd.isEmpty()) this.tileid = String.format("%03d%s%02d",corda,cordb,cordc);
         else this.tileid = String.format("%03d%s%02d%s",corda,cordb,cordc,cordd);
         valid = true;
-        //debug(index.toString());
-        //debug("creating tileid: "+this.tileid);
-    }
-    public boolean isValid() { return valid; }
-    public String getTileId() {
+    }
+    boolean isValid() {
+        return valid;
+    }
+    String getTileId() {
         return this.tileid;
     }
-    private void debug(String line) {
-        System.out.println(depth + "_" + tileid + ": " + line);
-    }
-    public boolean isVisible(Bounds view) {
+    boolean isVisible(Bounds view) {
         return view.intersects(bounds);
     }
-    public Point[] getCorners(MapView mv) {
+    Point[] getCorners(MapView mv) {
         LatLon min = bounds.getMin();
         LatLon max = bounds.getMax();
@@ -180,17 +184,19 @@
         return String.format("http://ftp2.cits.rncan.gc.ca/OSM/pub/%1$03d/%2$s/%1$03d%2$s%3$02d.zip",corda,cordb,cordc);
     }
-    private ZipFile open_zip() throws IOException {
-        File download_path = new File(layer.plugin_self.getPluginDir() + File.separator);
-        download_path.mkdir();
-        CachedFile tile_zip = new CachedFile(getDownloadUrl()).setDestDir(download_path.toString());
-        return new ZipFile(tile_zip.getFile());
-    }
-    public void downloadSelf() {
-        if (zip_scanned) return;
+    private ZipFile openZip() throws IOException {
+        File downloadPath = new File(layer.plugin.getPluginDir() + File.separator);
+        if (!downloadPath.mkdir() && Main.isDebugEnabled()) {
+            Main.debug("Unable to create directory: "+downloadPath);
+        }
+        CachedFile tileZip = new CachedFile(getDownloadUrl()).setDestDir(downloadPath.toString());
+        return new ZipFile(tileZip.getFile());
+    }
+    void downloadSelf() {
+        if (zipScanned) return;
         ZipFile zipFile;
         try {
-            zipFile = open_zip();
+            zipFile = openZip();
         } catch (IOException e) {
-            e.printStackTrace();
+            Main.error(e);
             return;
         }
@@ -198,23 +204,23 @@
         while (entries.hasMoreElements()) {
             ZipEntry entry = entries.nextElement();
-            if (entry.getName().equals("Metadata.txt")) continue;
-            sub_tile_ids.add(entry.getName());
-            zip_scanned = true;
-            CanVecTile final_tile = new CanVecTile(entry.getName(),layer);
-            if (final_tile.isValid()) sub_tiles.add(final_tile);
-        }
-    }
-    public void load_raw_osm() {
+            if ("Metadata.txt".equals(entry.getName())) continue;
+            subTileIds.add(entry.getName());
+            zipScanned = true;
+            CanVecTile finalTile = new CanVecTile(entry.getName(),layer);
+            if (finalTile.isValid()) {
+                subTiles.add(finalTile);
+            }
+        }
+    }
+    void loadRawOsm() {
         ZipFile zipFile;
         try {
-            zipFile = open_zip();
+            zipFile = openZip();
             Enumeration<? extends ZipEntry> entries = zipFile.entries();
             while (entries.hasMoreElements()) {
                 ZipEntry entry = entries.nextElement();
                 if (tileid.equals(entry.getName())) {
-                    debug("found myself!");
                     InputStream rawtile = zipFile.getInputStream(entry);
                     OsmImporter importer = new OsmImporter();
-                    debug("loading raw osm");
                     OsmImporterData temp = importer.loadLayer(rawtile, null, entry.getName(), null);
                     Main.worker.submit(temp.getPostLayerTask());
@@ -223,20 +229,17 @@
                 }
             }
-        } catch (IOException e) {
-            e.printStackTrace();
+        } catch (IOException | IllegalDataException e) {
+            Main.error(e);
             return;
-        } catch (IllegalDataException e) {
-            e.printStackTrace();
-            return;
-        }
-    }
-    private void make_sub_tiles(int layer) {
-        ArrayList<String> buffer = new ArrayList<>();
+        }
+    }
+    private void makeSubTiles(int layer) {
+        List<String> buffer = new ArrayList<>();
         Pattern p;
-        if (sub_tiles_made) return;
+        if (subTilesMade) return;
         switch (layer) {
         case 1:
             p = Pattern.compile("\\d\\d\\d([A-Z]).*");
-            String last_cell = "";
+            String lastCell = "";
             for (int i = 0; i < index.size(); i++) {
                 Matcher m = p.matcher(index.get(i));
@@ -244,20 +247,20 @@
 
                 String cell = m.group(1);
-                if (cell.equals(last_cell)) {
-                    buffer.add(m.group(0));
-                } else if (last_cell == "") {
+                if (cell.equals(lastCell)) {
+                    buffer.add(m.group(0));
+                } else if (lastCell.isEmpty()) {
                     buffer.add(m.group(0));
                 } else {
-                    sub_tiles.add(new CanVecTile(corda,last_cell,0,"",this.layer,buffer));
+                    subTiles.add(new CanVecTile(corda,lastCell,0,"",this.layer,buffer));
                     buffer = new ArrayList<>();
                     buffer.add(m.group(0));
                 }
-                last_cell = cell;
-            }
-            sub_tiles.add(new CanVecTile(corda,last_cell,0,"",this.layer,buffer));
+                lastCell = cell;
+            }
+            subTiles.add(new CanVecTile(corda,lastCell,0,"",this.layer,buffer));
             break;
         case 2:
             p = Pattern.compile("\\d\\d\\d[A-Z](\\d\\d).*");
-            int last_cell2 = -1;
+            int lastCell2 = -1;
             for (int i = 0; i < index.size(); i++) {
                 Matcher m = p.matcher(index.get(i));
@@ -265,22 +268,22 @@
 
                 int cell = Integer.parseInt(m.group(1));
-                if (cell == last_cell2) {
-                    buffer.add(m.group(0));
-                } else if (last_cell2 == -1) {
+                if (cell == lastCell2) {
+                    buffer.add(m.group(0));
+                } else if (lastCell2 == -1) {
                     buffer.add(m.group(0));
                 } else {
-                    sub_tiles.add(new CanVecTile(corda,cordb,last_cell2,"",this.layer,buffer));
+                    subTiles.add(new CanVecTile(corda,cordb,lastCell2,"",this.layer,buffer));
                     buffer = new ArrayList<>();
                     buffer.add(m.group(0));
                 }
-                last_cell2 = cell;
-            }
-            if (last_cell2 != -1) sub_tiles.add(new CanVecTile(corda,cordb,last_cell2,"",this.layer,buffer));
+                lastCell2 = cell;
+            }
+            if (lastCell2 != -1) subTiles.add(new CanVecTile(corda,cordb,lastCell2,"",this.layer,buffer));
             break;
         }
-        sub_tiles_made = true;
-    }
-    public void paint(Graphics2D g, MapView mv, Bounds bounds, int max_zoom) {
-        boolean show_sub_tiles = false;
+        subTilesMade = true;
+    }
+    void paint(Graphics2D g, MapView mv, Bounds bounds, int maxZoom) {
+        boolean showSubTiles = false;
         if (!isVisible(bounds)) return;
         if (depth == 4) {
@@ -288,29 +291,29 @@
         }
         if ((depth == 3) && (bounds.getArea() < 0.5)) { // 022B01
-            if (zip_scanned) {
-                show_sub_tiles = true;
-            } else if (can_download) {
+            if (zipScanned) {
+                showSubTiles = true;
+            } else if (canDownload) {
                 downloadSelf();
-                show_sub_tiles = true;
+                showSubTiles = true;
             } else {
                 layer.downloadable.add(this);
             }
         } else if ((depth == 2) && (bounds.getArea() < 20)) { // its a layer2 tile
-            make_sub_tiles(2);
-            show_sub_tiles = true;
+            makeSubTiles(2);
+            showSubTiles = true;
         } else if ((depth == 1) && (bounds.getArea() < 40)) { // its a layer1 tile and zoom too small
             // draw layer2 tiles for self
-            make_sub_tiles(1);
-            show_sub_tiles = true;
-        }
-        if (show_sub_tiles && (depth < max_zoom)) {
-            for (int i = 0; i < sub_tiles.size(); i++) {
-                CanVecTile tile = sub_tiles.get(i);
-                tile.paint(g,mv,bounds,max_zoom);
+            makeSubTiles(1);
+            showSubTiles = true;
+        }
+        if (showSubTiles && (depth < maxZoom)) {
+            for (int i = 0; i < subTiles.size(); i++) {
+                CanVecTile tile = subTiles.get(i);
+                tile.paint(g,mv,bounds,maxZoom);
             }
         } else {
-            Point corners[] = getCorners(mv);
-            int xs[] = { corners[0].x, corners[1].x, corners[2].x, corners[3].x };
-            int ys[] = { corners[0].y, corners[1].y, corners[2].y, corners[3].y };
+            Point[] corners = getCorners(mv);
+            int[] xs = { corners[0].x, corners[1].x, corners[2].x, corners[3].x };
+            int[] ys = { corners[0].y, corners[1].y, corners[2].y, corners[3].y };
             Polygon shape = new Polygon(xs,ys,4);
             g.draw(shape);
Index: applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecHelper.java
===================================================================
--- applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecHelper.java	(revision 30756)
+++ applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecHelper.java	(revision 30757)
@@ -1,22 +1,21 @@
+// License: GPL
 package org.openstreetmap.josm.plugins.canvec_helper;
 
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
-import org.openstreetmap.josm.gui.MapFrame;
-import org.openstreetmap.josm.Main;
 
+/**
+ * Canvec Helper plugin.
+ */
 public class CanvecHelper extends Plugin {
-    
+
+    /**
+     * Constructs a new {@code CanvecHelper} plugin.
+     * @param info plugin info
+     */
     public CanvecHelper(PluginInformation info) {
         super(info);
         Main.main.menu.imagerySubMenu.add(new CanvecHelperAction(this));
     }
-    
-    @Override
-    public void mapFrameInitialized(MapFrame old, MapFrame new1) {
-        updateLayer();
-    }
-    
-    private synchronized void updateLayer() {
-    }
 }
Index: applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecHelperAction.java
===================================================================
--- applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecHelperAction.java	(revision 30756)
+++ applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecHelperAction.java	(revision 30757)
@@ -1,2 +1,3 @@
+// License: GPL
 package org.openstreetmap.josm.plugins.canvec_helper;
 
@@ -4,15 +5,14 @@
 import org.openstreetmap.josm.Main;
 
-public class CanvecHelperAction extends JosmAction {
-    private CanvecHelper parent_temp;
-    public CanvecHelperAction(CanvecHelper parent) {
+class CanvecHelperAction extends JosmAction {
+    private CanvecHelper parentTemp;
+    CanvecHelperAction(CanvecHelper parent) {
         super("CanVec Helper","layericon24",null,null,false);
-        parent_temp = parent;
+        parentTemp = parent;
     }
-        @Override
+
+    @Override
     public void actionPerformed(java.awt.event.ActionEvent action) {
-        CanvecLayer layer;
-        layer = new CanvecLayer("canvec tile helper",parent_temp);
-        Main.main.addLayer(layer);
+        Main.main.addLayer(new CanvecLayer("canvec tile helper",parentTemp));
     }
 }
Index: applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecLayer.java
===================================================================
--- applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecLayer.java	(revision 30756)
+++ applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/CanvecLayer.java	(revision 30757)
@@ -1,2 +1,3 @@
+// License: GPL
 package org.openstreetmap.josm.plugins.canvec_helper;
 
@@ -8,10 +9,9 @@
 import java.awt.Toolkit;
 import java.awt.event.ActionEvent;
-import java.awt.event.MouseEvent;
-import java.awt.event.MouseListener;
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.List;
@@ -36,49 +36,44 @@
 
 // most of the layout was copied from the openstreetbugs plugin to get things started
-public class CanvecLayer extends Layer implements MouseListener {
+class CanvecLayer extends Layer {
     private Icon layerIcon = null;
-    private int max_zoom = 4;
-    public CanvecHelper plugin_self;
-    private ArrayList<CanVecTile> tiles = new ArrayList<>();
-    public ArrayList<CanVecTile> downloadable = new ArrayList<>();
-    public ArrayList<CanVecTile> openable = new ArrayList<>();
-
-    public CanvecLayer(String name,CanvecHelper self){
+    private int maxZoom = 4;
+    final CanvecHelper plugin;
+    private List<CanVecTile> tiles = new ArrayList<>();
+    List<CanVecTile> downloadable = new ArrayList<>();
+    List<CanVecTile> openable = new ArrayList<>();
+
+    CanvecLayer(String name, CanvecHelper self){
         super(name);
-        plugin_self = self;
+        plugin = self;
         this.setBackgroundLayer(true);
-/*        for (int i = 0; i < 119; i++) {
-            CanVecTile tile = new CanVecTile(i,"",0,"",plugin_self);
-            if (tile.isValid()) tiles.add(tile);
-        }*/
         layerIcon = new ImageIcon(Toolkit.getDefaultToolkit().createImage(getClass().getResource("/images/layericon.png")));
         long start = System.currentTimeMillis();
         try (
             InputStream index = new CachedFile("http://ftp2.cits.rncan.gc.ca/OSM/pub/ZippedOsm.txt").getInputStream();
-            BufferedReader br = new BufferedReader(new InputStreamReader(index));
+            BufferedReader br = new BufferedReader(new InputStreamReader(index, StandardCharsets.UTF_8));
         ) {
             Pattern p = Pattern.compile("(\\d\\d\\d)([A-Z]\\d\\d).*");
             String line;
-            int last_cell = -1;
-            ArrayList<String> list = new ArrayList<>();
+            int lastCell = -1;
+            List<String> list = new ArrayList<>();
             while ((line = br.readLine()) != null) {
                 Matcher m = p.matcher(line);
                 if (m.find()) {
                     int cell = Integer.parseInt(m.group(1));
-                    if (cell == last_cell) {
+                    if (cell == lastCell) {
                         list.add(m.group(0));
-                    } else if (last_cell != -1) {
-                        CanVecTile tile = new CanVecTile(last_cell,"",0,"",this,list);
+                    } else if (lastCell != -1) {
+                        CanVecTile tile = new CanVecTile(lastCell,"",0,"",this,list);
                         if (tile.isValid()) tiles.add(tile);
                         list = new ArrayList<>();
                         list.add(m.group(0));
                     }
-                    last_cell = cell;
-                } else if (line.contains("Metadata.txt")) {
-                } else {
-                    System.out.print("bad line '" + line + "'\n");
+                    lastCell = cell;
+                } else if (!line.contains("Metadata.txt")) {
+                    Main.warn("bad line '" + line + "'\n");
                 }
             }
-            CanVecTile tile = new CanVecTile(last_cell,"",0,"",this,list);
+            CanVecTile tile = new CanVecTile(lastCell,"",0,"",this,list);
             if (tile.isValid()) tiles.add(tile);
 
@@ -103,79 +98,85 @@
             new OpenOsmAction(this)};
     }
-    public class MaxZoomAction extends AbstractAction implements LayerAction {
-        private CanvecLayer parent;
-        public MaxZoomAction(CanvecLayer parent) {
+    private static class MaxZoomAction extends AbstractAction implements LayerAction {
+        private final CanvecLayer parent;
+        private MaxZoomAction(CanvecLayer parent) {
             this.parent = parent;
         }
-                @Override
-        public void actionPerformed(ActionEvent e) {}
-                @Override
+        @Override
+        public void actionPerformed(ActionEvent e) {
+            // Do nothing
+        }
+        @Override
         public boolean supportLayers(List<Layer> layers) {
             return false;
         }
-                @Override
+        @Override
         public Component createMenuComponent() {
-            JMenu max_zoom = new JMenu("max zoom");
-            max_zoom.add(new JMenuItem(new SetMaxZoom(parent,1)));
-            max_zoom.add(new JMenuItem(new SetMaxZoom(parent,2)));
-            max_zoom.add(new JMenuItem(new SetMaxZoom(parent,3)));
-            max_zoom.add(new JMenuItem(new SetMaxZoom(parent,4)));
-            return max_zoom;
-        }
-    }
-    private class AllowDownload extends AbstractAction {
-        CanVecTile tile;
-        public AllowDownload(CanVecTile tile) {
+            JMenu maxZoomMenu = new JMenu("max zoom");
+            maxZoomMenu.add(new JMenuItem(new SetMaxZoom(parent,1)));
+            maxZoomMenu.add(new JMenuItem(new SetMaxZoom(parent,2)));
+            maxZoomMenu.add(new JMenuItem(new SetMaxZoom(parent,3)));
+            maxZoomMenu.add(new JMenuItem(new SetMaxZoom(parent,4)));
+            return maxZoomMenu;
+        }
+    }
+    private static class AllowDownload extends AbstractAction {
+        private final CanVecTile tile;
+        private AllowDownload(CanVecTile tile) {
             super(tile.tileid);
             this.tile = tile;
         }
-                @Override
+        @Override
         public void actionPerformed(ActionEvent arg0) {
-            tile.can_download = true;
+            tile.canDownload = true;
         }
     }
     private class OpenOsmAction extends AbstractAction implements LayerAction {
         private CanvecLayer layer;
-        public OpenOsmAction(CanvecLayer layer) {
+        private OpenOsmAction(CanvecLayer layer) {
             this.layer = layer;
         }
-                @Override
-        public void actionPerformed(ActionEvent e) {}
-                @Override
+        @Override
+        public void actionPerformed(ActionEvent e) {
+            // Do nothing
+        }
+        @Override
         public Component createMenuComponent() {
-            JMenu OpenOsm = new JMenu("Open tile");
+            JMenu openOsm = new JMenu("Open tile");
             for (int i = 0; i < layer.openable.size(); i++) {
-                OpenOsm.add(new JMenuItem(new DoOpenOsm(layer.openable.get(i))));
-            }
-            return OpenOsm;
-        }
-                @Override
+                openOsm.add(new JMenuItem(new DoOpenOsm(layer.openable.get(i))));
+            }
+            return openOsm;
+        }
+        @Override
         public boolean supportLayers(List<Layer> layers) {
             return false;
         }
     }
-    private class DoOpenOsm extends AbstractAction {
-        CanVecTile tile;
-        public DoOpenOsm(CanVecTile tile) {
+    private static class DoOpenOsm extends AbstractAction {
+        private final CanVecTile tile;
+        private DoOpenOsm(CanVecTile tile) {
             super(tile.tileid);
             this.tile = tile;
         }
-                @Override
-        public void actionPerformed(ActionEvent e) {
-            tile.load_raw_osm();
+        @Override
+        public void actionPerformed(ActionEvent e) {
+            tile.loadRawOsm();
         }
     }
     private class DownloadCanvecAction extends AbstractAction implements LayerAction {
         private CanvecLayer parent;
-        public DownloadCanvecAction(CanvecLayer parent) {
+        private DownloadCanvecAction(CanvecLayer parent) {
             this.parent = parent;
         }
-                @Override
-        public void actionPerformed(ActionEvent e) {}
-                @Override
+        @Override
+        public void actionPerformed(ActionEvent e) {
+            // Do nothing
+        }
+        @Override
         public boolean supportLayers(List<Layer> layers) {
             return false;
         }
-                @Override
+        @Override
         public Component createMenuComponent() {
             JMenu downloadCanvec = new JMenu("Download zip's");
@@ -186,29 +187,33 @@
         }
     }
-    public void setMaxZoom(int max_zoom) {
-        this.max_zoom = max_zoom;
-    }
-        @Override
+    void setMaxZoom(int maxZoom) {
+        this.maxZoom = maxZoom;
+    }
+    @Override
     public Object getInfoComponent() {
         return getToolTipText();
     }
-        @Override
+    @Override
     public String getToolTipText() {
         return tr("canvec tile helper");
     }
-        @Override
-    public void visitBoundingBox(BoundingXYVisitor v) {}
-        @Override
+    @Override
+    public void visitBoundingBox(BoundingXYVisitor v) {
+        // Do nothing
+    }
+    @Override
     public boolean isMergable(Layer other) {
         return false;
     }
-        @Override
-    public void mergeFrom(Layer from) {}
-        @Override
-    public Icon getIcon() { return layerIcon; }
-        @Override
+    @Override
+    public void mergeFrom(Layer from) {
+        // Do nothing
+    }
+    @Override
+    public Icon getIcon() {
+        return layerIcon;
+    }
+    @Override
     public void paint(Graphics2D g, MapView mv, Bounds bounds) {
-        //long start = System.currentTimeMillis();
-        //System.out.println("painting the area covered by "+bounds.toString());
         downloadable = new ArrayList<>();
         openable = new ArrayList<>();
@@ -217,20 +222,6 @@
         for (int i = 0; i < tiles.size(); i++) {
             CanVecTile tile = tiles.get(i);
-            tile.paint(g,mv,bounds,max_zoom);
-        }
-        //long end = System.currentTimeMillis();
-        //System.out.println((end-start)+"ms spent");
-    }
-        @Override
-    public void mouseExited(MouseEvent e) {}
-        @Override
-    public void mouseEntered(MouseEvent e) {}
-        @Override
-    public void mouseReleased(MouseEvent e) {}
-        @Override
-    public void mousePressed(MouseEvent e) {}
-        @Override
-    public void mouseClicked(MouseEvent e) {
-        System.out.println("click!");
+            tile.paint(g,mv,bounds,maxZoom);
+        }
     }
 }
Index: applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/SetMaxZoom.java
===================================================================
--- applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/SetMaxZoom.java	(revision 30756)
+++ applications/editors/josm/plugins/canvec_helper/src/org/openstreetmap/josm/plugins/canvec_helper/SetMaxZoom.java	(revision 30757)
@@ -1,2 +1,3 @@
+// License: GPL
 package org.openstreetmap.josm.plugins.canvec_helper;
 
@@ -7,10 +8,10 @@
     private CanvecLayer parent;
     private int level;
-    public SetMaxZoom(CanvecLayer parent,int level) {
+    SetMaxZoom(CanvecLayer parent,int level) {
         super(""+level);
         this.level = level;
         this.parent = parent;
     }
-        @Override
+    @Override
     public void actionPerformed(ActionEvent ev) {
         parent.setMaxZoom(level);
