Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java	(revision 31429)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java	(revision 31430)
@@ -44,17 +44,17 @@
 public class JMapViewer extends JPanel implements TileLoaderListener {
 
-    public static boolean debug = false;
+    public static final boolean DEBUG = false;
 
     /**
      * Vectors for clock-wise tile painting
      */
-    protected static final Point[] move = {new Point(1, 0), new Point(0, 1), new Point(-1, 0), new Point(0, -1)};
+    private static final Point[] move = {new Point(1, 0), new Point(0, 1), new Point(-1, 0), new Point(0, -1)};
 
     public static final int MAX_ZOOM = 22;
     public static final int MIN_ZOOM = 0;
 
-    protected List<MapMarker> mapMarkerList;
-    protected List<MapRectangle> mapRectangleList;
-    protected List<MapPolygon> mapPolygonList;
+    protected transient List<MapMarker> mapMarkerList;
+    protected transient List<MapRectangle> mapRectangleList;
+    protected transient List<MapPolygon> mapPolygonList;
 
     protected boolean mapMarkersVisible;
@@ -65,5 +65,5 @@
     protected boolean scrollWrapEnabled;
 
-    protected TileController tileController;
+    protected transient TileController tileController;
 
     /**
@@ -91,5 +91,5 @@
     protected transient TileSource tileSource;
 
-    protected AttributionSupport attribution = new AttributionSupport();
+    protected transient AttributionSupport attribution = new AttributionSupport();
 
     /**
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JobDispatcher.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JobDispatcher.java	(revision 31429)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JobDispatcher.java	(revision 31430)
@@ -34,5 +34,5 @@
     protected BlockingDeque<TileJob> jobQueue = new LinkedBlockingDeque<>();
 
-    protected static int workerThreadMaxCount = 8;
+    private static int workerThreadMaxCount = 8;
 
     /**
@@ -42,5 +42,5 @@
      * ignores the timeout and will never terminate itself.
      */
-    protected static int workerThreadTimeout = 30;
+    private static int workerThreadTimeout = 30;
 
     /**
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmMercator.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmMercator.java	(revision 31429)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmMercator.java	(revision 31430)
@@ -16,5 +16,5 @@
      * default tile size
      */
-    public static int DEFAUL_TILE_SIZE = 256;
+    public static final int DEFAUL_TILE_SIZE = 256;
     /** maximum latitude (north) for mercator display */
     public static final double MAX_LAT = 85.05112877980659;
@@ -128,5 +128,5 @@
      * @return [0..2^Zoomlevel*TILE_SIZE[
      */
-    public double LonToX(double aLongitude, int aZoomlevel) {
+    public double lonToX(double aLongitude, int aZoomlevel) {
         int mp = getMaxPixels(aZoomlevel);
         double x = (mp * (aLongitude + 180L)) / 360L;
@@ -151,5 +151,5 @@
      * @return [0..2^Zoomlevel*TILE_SIZE[
      */
-    public double LatToY(double aLat, int aZoomlevel) {
+    public double latToY(double aLat, int aZoomlevel) {
         if (aLat < MIN_LAT)
             aLat = MIN_LAT;
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java	(revision 31429)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java	(revision 31430)
@@ -144,5 +144,5 @@
             } catch (NumberFormatException e) {
                 // ignore malformed Cache-Control headers
-                if (JMapViewer.debug) {
+                if (JMapViewer.DEBUG) {
                     System.err.println(e.getMessage());
                 }
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java	(revision 31429)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java	(revision 31430)
@@ -27,17 +27,17 @@
      * Hourglass image that is displayed until a map tile has been loaded, except for overlay sources
      */
-    public static BufferedImage LOADING_IMAGE;
+    public static final BufferedImage LOADING_IMAGE = loadImage("images/hourglass.png");
 
     /**
      * Red cross image that is displayed after a loading error, except for overlay sources
      */
-    public static BufferedImage ERROR_IMAGE;
-
-    static {
+    public static final BufferedImage ERROR_IMAGE = loadImage("images/error.png");
+
+    private static BufferedImage loadImage(String path) {
         try {
-            LOADING_IMAGE = ImageIO.read(JMapViewer.class.getResourceAsStream("images/hourglass.png"));
-            ERROR_IMAGE = ImageIO.read(JMapViewer.class.getResourceAsStream("images/error.png"));
+            return ImageIO.read(JMapViewer.class.getResourceAsStream(path));
         } catch (Exception ex) {
             ex.printStackTrace();
+            return null;
         }
     }
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTMSTileSource.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTMSTileSource.java	(revision 31429)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/AbstractTMSTileSource.java	(revision 31430)
@@ -129,10 +129,10 @@
     @Override
     public int lonToX(double lon, int zoom) {
-        return (int) osmMercator.LonToX(lon, zoom);
+        return (int) osmMercator.lonToX(lon, zoom);
     }
 
     @Override
     public int latToY(double lat, int zoom) {
-        return (int) osmMercator.LatToY(lat, zoom);
+        return (int) osmMercator.latToY(lat, zoom);
     }
 
@@ -140,6 +140,6 @@
     public Point latLonToXY(double lat, double lon, int zoom) {
         return new Point(
-                (int) osmMercator.LonToX(lon, zoom),
-                (int) osmMercator.LatToY(lat, zoom)
+                (int) osmMercator.lonToX(lon, zoom),
+                (int) osmMercator.latToY(lat, zoom)
                 );
     }
@@ -175,10 +175,10 @@
     @Override
     public double latToTileY(double lat, int zoom) {
-        return osmMercator.LatToY(lat, zoom) / tileSize;
+        return osmMercator.latToY(lat, zoom) / tileSize;
     }
 
     @Override
     public double lonToTileX(double lon, int zoom) {
-        return osmMercator.LonToX(lon, zoom) / tileSize;
+        return osmMercator.lonToX(lon, zoom) / tileSize;
     }
 
@@ -186,6 +186,6 @@
     public TileXY latLonToTileXY(double lat, double lon, int zoom) {
         return new TileXY(
-                osmMercator.LonToX(lon, zoom) / tileSize,
-                osmMercator.LatToY(lat, zoom) / tileSize
+                osmMercator.lonToX(lon, zoom) / tileSize,
+                osmMercator.latToY(lat, zoom) / tileSize
                 );
     }
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java	(revision 31429)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java	(revision 31430)
@@ -196,5 +196,5 @@
                 for (int i = 0; i < 5 && getAttribution() == null; i++) {
                     // Makes sure attribution is loaded
-                    if (JMapViewer.debug) {
+                    if (JMapViewer.DEBUG) {
                         System.out.println("Bing attribution attempt " + (i+1));
                     }
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java	(revision 31429)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TemplatedTMSTileSource.java	(revision 31430)
@@ -90,5 +90,5 @@
         if (m.matches()) {
             if (m.group(1) != null) {
-                finalZoom = Integer.valueOf(m.group(1))-zoom;
+                finalZoom = Integer.parseInt(m.group(1))-zoom;
             }
             if (m.group(2) != null) {
@@ -96,5 +96,5 @@
                 if (ofs.startsWith("+"))
                     ofs = ofs.substring(1);
-                finalZoom += Integer.valueOf(ofs);
+                finalZoom += Integer.parseInt(ofs);
             }
         }
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TileSourceInfo.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TileSourceInfo.java	(revision 31429)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/TileSourceInfo.java	(revision 31430)
@@ -13,10 +13,11 @@
 public class TileSourceInfo {
     /** id for this imagery entry, optional at the moment */
-    protected String id;
+    private final String id;
+
     /** URL of the imagery service */
-    protected  String url = null;
+    private final String url;
 
     /** name of the imagery layer */
-    protected String name;
+    private final String name;
 
     /** headers meaning, that there is no tile at this zoom level */
@@ -46,5 +47,5 @@
      */
     public TileSourceInfo(String name, String base_url, String id) {
-        this(name);
+        this.name = name;
         this.url = base_url;
         this.id = id;
@@ -57,5 +58,5 @@
      */
     public TileSourceInfo(String name) {
-        this.name = name;
+        this(name, null, null);
     }
 
@@ -64,4 +65,5 @@
      */
     public TileSourceInfo() {
+        this(null, null, null);
     }
 
@@ -70,5 +72,5 @@
      * @return name of the tile source
      */
-    public String getName() {
+    public final String getName() {
         return name;
     }
@@ -78,6 +80,14 @@
      * @return url of the tile source
      */
-    public String getUrl() {
+    public final String getUrl() {
         return url;
+    }
+
+    /**
+     * Request ID of the tile source
+     * @return id of the tile source
+     */
+    public final String getId() {
+        return id;
     }
 
