Index: /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ColorMap.java
===================================================================
--- /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ColorMap.java	(revision 29976)
+++ /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/ColorMap.java	(revision 29977)
@@ -1,13 +1,13 @@
 /**
- * This program is free software: you can redistribute it and/or modify it under 
- * the terms of the GNU General Public License as published by the 
- * Free Software Foundation, either version 3 of the License, or 
- * (at your option) any later version. 
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
  * 
- * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
- * See the GNU General Public License for more details. 
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
  * 
- * You should have received a copy of the GNU General Public License along with this program. 
+ * You should have received a copy of the GNU General Public License along with this program.
  * If not, see <http://www.gnu.org/licenses/>.
  */
@@ -31,21 +31,21 @@
     private String name;
     private static HashMap<String, ColorMap> colorMaps;
-    
+
     static {
-	colorMaps = new HashMap<String, ColorMap>();	
-    }
-    
+	colorMaps = new HashMap<String, ColorMap>();
+    }
+
     // Private ctor to enforce use of create
-    private ColorMap() {	
-    }
-    
+    private ColorMap() {
+    }
+
     public String getName() {
-        return name;
+	return name;
     }
 
     public void setName(String name) {
-        this.name = name;
-    }
-    
+	this.name = name;
+    }
+
     /**
      * Gets the color according to the given elevation value.
@@ -59,23 +59,23 @@
 	    return Color.white;
 	}
-	
+
 	// out of range?
 	if (elevation < colorList.get(0).ele) {
 	    return colorList.get(0).getColor();
 	}
-	
+
 	int last = colorList.size() - 1;
 	if (elevation > colorList.get(last).ele) {
 	    return colorList.get(last).getColor();
 	}
-	
+
 	// find elevation section
 	for (int i = 0; i < last; i++) {
 	    ColorMapEntry e1 = colorList.get(i);
 	    ColorMapEntry e2 = colorList.get(i + 1);
-	    
+
 	    // elevation within range?
 	    if (e1.getEle() <= elevation && e2.getEle() >= elevation) {
-		
+
 		// interpolate color between both
 		double val = (elevation - e1.getEle()) / (double)(e2.getEle() - e1.getEle());
@@ -83,10 +83,10 @@
 	    }
 	}
-	
+
 	// here we should never end!
 	throw new RuntimeException("Inconsistent color map - found no entry for elevation " + elevation);
     }
-    
-    
+
+
     /**
      * Gets the color map with the given name.
@@ -98,10 +98,10 @@
 	if (colorMaps.containsKey(name)) {
 	    return colorMaps.get(name);
-	}	
+	}
 	return null;
     }
-    
-    /**
-     * Gets the number of available color maps. 
+
+    /**
+     * Gets the number of available color maps.
      *
      * @return the int
@@ -110,6 +110,6 @@
 	return colorMaps != null ? colorMaps.size() : 0;
     }
-    
-    
+
+
     /**
      * Gets the available color map names.
@@ -118,8 +118,8 @@
      * @return the map or <code>null</code>, if no such map exists
      */
-    public static String[] getNames() {		
+    public static String[] getNames() {
 	return colorMaps.keySet().toArray(new String[size()]);
     }
-    
+
     private static void registerColorMap(ColorMap newMap) {
 	CheckParameterUtil.ensureParameterNotNull(newMap);
@@ -132,7 +132,7 @@
 	}
     }
-    
+
     public static Color interpolate(java.awt.Color c1, java.awt.Color c2, double ratio) {
-	double r1 = ratio;
+	double r1 = 1 -ratio;
 	// clip
 	if (r1 < 0) r1 = 0d;
@@ -158,28 +158,28 @@
 	CheckParameterUtil.ensureParameterNotNull(colors);
 	CheckParameterUtil.ensureParameterNotNull(ele);
-	
+
 	if (colors.length != ele.length) {
 	    throw new IllegalArgumentException("Arrays colors and ele must have same length: " + colors.length + " vs " + ele.length);
 	}
-	
+
 	ColorMap map = new ColorMap();
-	map.colorList = new ArrayList<ColorMap.ColorMapEntry>(); 
+	map.colorList = new ArrayList<ColorMap.ColorMapEntry>();
 	map.name = name;
 	for (int i = 0; i < ele.length; i++) {
 	    map.colorList.add(map.new ColorMapEntry(colors[i], ele[i]));
 	}
-	
+
 	// sort by elevation
 	Collections.sort(map.colorList);
-	
+
 	registerColorMap(map);
 	return map;
     }
-    
+
 
     class ColorMapEntry implements Comparable<ColorMapEntry> {
-	private int ele; // limit	
-	private Color color;
-	
+	private final int ele; // limit
+	private final Color color;
+
 	public ColorMapEntry(Color color, int ele) {
 	    super();
@@ -197,5 +197,5 @@
 
 	@Override
-	public int compareTo(ColorMapEntry o) {	    
+	public int compareTo(ColorMapEntry o) {
 	    return this.ele - o.ele;
 	}
Index: /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/actions/AddElevationLayerAction.java
===================================================================
--- /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/actions/AddElevationLayerAction.java	(revision 29976)
+++ /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/actions/AddElevationLayerAction.java	(revision 29977)
@@ -32,5 +32,5 @@
 
     public AddElevationLayerAction() {
-	super(tr("Elevation Grid Layer"), "elevation", tr("Shows elevation grid layer"), null, true);
+	super(tr("Elevation Grid Layer (experimental!)"), "elevation", tr("Shows elevation grid layer"), null, true);
     }
 
Index: /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/grid/ElevationGridTile.java
===================================================================
--- /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/grid/ElevationGridTile.java	(revision 29976)
+++ /applications/editors/josm/plugins/ElevationProfile/src/org/openstreetmap/josm/plugins/elevation/grid/ElevationGridTile.java	(revision 29977)
@@ -92,4 +92,6 @@
 	if (isLoaded()) return;	
 	
+	// TODO: Save 
+	
 	// We abuse the loadImage method to render the vertices...
 	// 
@@ -113,4 +115,11 @@
     }
 
+    /**
+     * See also <a href="http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Tile_bounding_box">OSM Wiki</a>
+     * @param x the x
+     * @param y the y
+     * @param zoom the zoom
+     * @return the bounds
+     */
     private Bounds tile2Bounds(final int x, final int y, final int zoom) {
 	Bounds bb = new Bounds(
