Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Demo.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Demo.java	(revision 30855)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Demo.java	(revision 30875)
@@ -58,10 +58,6 @@
 
         // Listen to the map viewer for user operations so components will
-        // recieve events and update
+        // receive events and update
         map().addJMVListener(this);
-
-        // final JMapViewer map = new JMapViewer(new MemoryTileCache(),4);
-        // map.setTileLoader(new OsmFileCacheTileLoader(map));
-        // new DefaultMapController(map);
 
         setLayout(new BorderLayout());
@@ -94,6 +90,10 @@
             }
         });
-        JComboBox<TileSource> tileSourceSelector = new JComboBox<>(new TileSource[] { new OsmTileSource.Mapnik(),
-                new OsmTileSource.CycleMap(), new BingAerialTileSource(), new MapQuestOsmTileSource(), new MapQuestOpenAerialTileSource() });
+        JComboBox<TileSource> tileSourceSelector = new JComboBox<>(new TileSource[] {
+                new OsmTileSource.Mapnik(),
+                new OsmTileSource.CycleMap(),
+                new BingAerialTileSource(),
+                new MapQuestOsmTileSource(),
+                new MapQuestOpenAerialTileSource() });
         tileSourceSelector.addItemListener(new ItemListener() {
             public void itemStateChanged(ItemEvent e) {
@@ -149,5 +149,5 @@
         panelBottom.add(showTileGrid);
         final JCheckBox showZoomControls = new JCheckBox("Show zoom controls");
-        showZoomControls.setSelected(map().getZoomContolsVisible());
+        showZoomControls.setSelected(map().getZoomControlsVisible());
         showZoomControls.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java	(revision 30855)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java	(revision 30875)
@@ -96,9 +96,8 @@
      * Creates a standard {@link JMapViewer} instance that can be controlled via
      * mouse: hold right mouse button for moving, double click left mouse button
-     * or use mouse wheel for zooming. Loaded tiles are stored the
+     * or use mouse wheel for zooming. Loaded tiles are stored in a
      * {@link MemoryTileCache} and the tile loader uses 4 parallel threads for
      * retrieving the tiles.
      */
-    @SuppressWarnings("unused")
     public JMapViewer() {
         this(new MemoryTileCache(), 8);
@@ -106,6 +105,10 @@
     }
 
+    /**
+     * Creates a new {@link JMapViewer} instance.
+     * @param tileCache The cache where to store tiles
+     * @param downloadThreadCount The number of parallel threads for retrieving the tiles
+     */
     public JMapViewer(TileCache tileCache, int downloadThreadCount) {
-        super();
         JobDispatcher.setMaxWorkers(downloadThreadCount);
         tileSource = new OsmTileSource.Mapnik();
@@ -123,11 +126,8 @@
         setPreferredSize(new Dimension(400, 400));
         setDisplayPosition(new Coordinate(50, 9), 3);
-        //setToolTipText("");
     }
 
     @Override
     public String getToolTipText(MouseEvent event) {
-        //        Point screenPoint = event.getLocationOnScreen();
-        //        Coordinate c = getPosition(screenPoint);
         return super.getToolTipText(event);
     }
@@ -245,6 +245,5 @@
 
     /**
-     * Sets the displayed map pane and zoom level so that all chosen map elements are
-     * visible.
+     * Sets the displayed map pane and zoom level so that all chosen map elements are visible.
      */
     public void setDisplayToFitMapElements(boolean markers, boolean rectangles, boolean polygons) {
@@ -329,6 +328,5 @@
 
     /**
-     * Sets the displayed map pane and zoom level so that all map markers are
-     * visible.
+     * Sets the displayed map pane and zoom level so that all map markers are visible.
      */
     public void setDisplayToFitMapMarkers() {
@@ -337,6 +335,5 @@
 
     /**
-     * Sets the displayed map pane and zoom level so that all map rectangles are
-     * visible.
+     * Sets the displayed map pane and zoom level so that all map rectangles are visible.
      */
     public void setDisplayToFitMapRectangles() {
@@ -345,6 +342,5 @@
 
     /**
-     * Sets the displayed map pane and zoom level so that all map polygons are
-     * visible.
+     * Sets the displayed map pane and zoom level so that all map polygons are visible.
      */
     public void setDisplayToFitMapPolygons() {
@@ -798,4 +794,5 @@
     /**
      * Increases the current zoom level by one
+     * @param mapPoint point to choose as center for new zoom level
      */
     public void zoomIn(Point mapPoint) {
@@ -965,5 +962,5 @@
     }
 
-    public boolean getZoomContolsVisible() {
+    public boolean getZoomControlsVisible() {
         return zoomSlider.isVisible();
     }
@@ -973,5 +970,5 @@
             throw new RuntimeException("Maximum zoom level too high");
         if (tileSource.getMinZoom() < MIN_ZOOM)
-            throw new RuntimeException("Minumim zoom level too low");
+            throw new RuntimeException("Minimum zoom level too low");
         Coordinate position = getPosition();
         this.tileSource = tileSource;
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MemoryTileCache.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MemoryTileCache.java	(revision 30855)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MemoryTileCache.java	(revision 30875)
@@ -32,4 +32,7 @@
     protected final CacheLinkedListElement lruTiles;
 
+    /**
+     * Constructs a new {@code MemoryTileCache}.
+     */
     public MemoryTileCache() {
         hash = new HashMap<>(cacheSize);
@@ -81,7 +84,5 @@
     }
 
-    /**
-     * Clears the cache deleting all tiles from memory
-     */
+    @Override
     public synchronized void clear() {
         hash.clear();
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java	(revision 30855)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java	(revision 30875)
@@ -71,6 +71,8 @@
                     if (input == null) {
                         try {
-                            System.err.println("Failed loading " + tile.getUrl() +": " + e.getMessage());
-                        } catch(IOException i) {
+                            System.err.println("Failed loading " + tile.getUrl() +": "
+                                    +e.getClass() + ": " + e.getMessage());
+                        } catch (IOException ioe) {
+                            ioe.printStackTrace();
                         }
                     }
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java	(revision 30855)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java	(revision 30875)
@@ -25,7 +25,11 @@
 
     /**
-     * Hourglass image that is displayed until a map tile has been loaded
+     * Hourglass image that is displayed until a map tile has been loaded, except for overlay sources
      */
     public static BufferedImage LOADING_IMAGE;
+
+    /**
+     * Red cross image that is displayed after a loading error, except for overlay sources
+     */
     public static BufferedImage ERROR_IMAGE;
 
@@ -34,7 +38,6 @@
             LOADING_IMAGE = ImageIO.read(JMapViewer.class.getResourceAsStream("images/hourglass.png"));
             ERROR_IMAGE = ImageIO.read(JMapViewer.class.getResourceAsStream("images/error.png"));
-        } catch (Exception e1) {
-            LOADING_IMAGE = null;
-            ERROR_IMAGE = null;
+        } catch (Exception ex) {
+            ex.printStackTrace();
         }
     }
@@ -57,22 +60,29 @@
      * Creates a tile with empty image.
      *
-     * @param source
-     * @param xtile
-     * @param ytile
-     * @param zoom
+     * @param source Tile source
+     * @param xtile X coordinate
+     * @param ytile Y coordinate
+     * @param zoom Zoom level
      */
     public Tile(TileSource source, int xtile, int ytile, int zoom) {
-        super();
+        this(source, xtile, ytile, zoom, LOADING_IMAGE);
+    }
+
+    /**
+     * Creates a tile with specified image.
+     *
+     * @param source Tile source
+     * @param xtile X coordinate
+     * @param ytile Y coordinate
+     * @param zoom Zoom level
+     * @param image Image content
+     */
+    public Tile(TileSource source, int xtile, int ytile, int zoom, BufferedImage image) {
         this.source = source;
         this.xtile = xtile;
         this.ytile = ytile;
         this.zoom = zoom;
-        this.image = LOADING_IMAGE;
+        this.image = image;
         this.key = getTileKey(source, xtile, ytile, zoom);
-    }
-
-    public Tile(TileSource source, int xtile, int ytile, int zoom, BufferedImage image) {
-        this(source, xtile, ytile, zoom);
-        this.image = image;
     }
 
@@ -138,4 +148,5 @@
 
     /**
+     * Returns the X coordinate.
      * @return tile number on the x axis of this tile
      */
@@ -145,4 +156,5 @@
 
     /**
+     * Returns the Y coordinate.
      * @return tile number on the y axis of this tile
      */
@@ -152,4 +164,5 @@
 
     /**
+     * Returns the zoom level.
      * @return zoom level of this tile
      */
@@ -197,9 +210,7 @@
      * position <code>x</code>/<code>y</code>.
      *
-     * @param g
-     * @param x
-     *            x-coordinate in <code>g</code>
-     * @param y
-     *            y-coordinate in <code>g</code>
+     * @param g the Graphics object
+     * @param x x-coordinate in <code>g</code>
+     * @param y y-coordinate in <code>g</code>
      */
     public void paint(Graphics g, int x, int y) {
@@ -286,6 +297,6 @@
      * the meta data.
      *
-     * @param key
-     * @param value
+     * @param key Key
+     * @param value Value
      */
     public void putValue(String key, String value) {
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/TileController.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/TileController.java	(revision 30855)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/TileController.java	(revision 30875)
@@ -7,5 +7,4 @@
 import org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener;
 import org.openstreetmap.gui.jmapviewer.interfaces.TileSource;
-import org.openstreetmap.gui.jmapviewer.tilesources.OsmTileSource;
 
 public class TileController {
@@ -17,8 +16,8 @@
 
     public TileController(TileSource source, TileCache tileCache, TileLoaderListener listener) {
-        tileSource = new OsmTileSource.Mapnik();
-        tileLoader = new OsmTileLoader(listener);
+        this.tileSource = source;
+        this.tileLoader = new OsmTileLoader(listener);
         this.tileCache = tileCache;
-        jobDispatcher = JobDispatcher.getInstance();
+        this.jobDispatcher = JobDispatcher.getInstance();
     }
 
@@ -81,5 +80,5 @@
 
     /**
-     *
+     * Removes all jobs from the queue that are currently not being processed.
      */
     public void cancelOutstandingJobs() {
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileCache.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileCache.java	(revision 30855)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileCache.java	(revision 30875)
@@ -43,3 +43,8 @@
      */
     public int getTileCount();
+
+    /**
+     * Clears the cache deleting all tiles from memory.
+     */
+    public void clear();
 }
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileLoaderListener.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileLoaderListener.java	(revision 30855)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileLoaderListener.java	(revision 30875)
@@ -10,14 +10,7 @@
      * Loaded can mean downloaded or loaded from file cache.
      *
-     * @param tile
+     * @param tile The tile
+     * @param success {@code true} if the tile has been loaded successfully, {@code false} otherwise
      */
     public void tileLoadingFinished(Tile tile, boolean success);
-
-    /**
-     * Return the {@link TileCache} class containing {@link Tile}
-     * data for requested and loaded tiles
-     *
-     * @return tile information caching class
-     */
-    public TileCache getTileCache();
 }
Index: applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/OsmTileSource.java
===================================================================
--- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/OsmTileSource.java	(revision 30855)
+++ applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/OsmTileSource.java	(revision 30875)
@@ -57,5 +57,5 @@
          */
         public CycleMap() {
-            super("Cyclemap", PATTERN, "opencylemap");
+            super("Cyclemap", PATTERN, "opencyclemap");
         }
 
