Index: /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/Lakewalker.java
===================================================================
--- /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/Lakewalker.java	(revision 6913)
+++ /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/Lakewalker.java	(revision 6914)
@@ -111,4 +111,6 @@
 		int v;
 		
+		setStatus("Looking for shoreline...");
+		
 		while(true){
 			double[] geo = xy_to_geo(xy[0],xy[1],this.resolution);
@@ -136,7 +138,5 @@
 		int[] startxy = new int[] {xy[0], xy[1]};
 		double[] startgeo = xy_to_geo(xy[0],xy[1],this.resolution);
-				
-		System.out.println("Found shore at "+startxy[0]+","+startxy[1]);
-		
+
 		System.out.printf("Found shore at lat %.4f lon %.4f\n",lat,lon);
 		
@@ -145,5 +145,7 @@
 		for(int i = 0; i < this.maxnode; i++){
 			
+			// Print a counter
 			if(i % 250 == 0){
+				setStatus(i+" nodes so far...");
 				System.out.println(i+" nodes so far...");
 			}
@@ -155,6 +157,8 @@
 			int new_dir = 0;
 			
+			// Loop through all the directions we can go
 			for(d = 1; d <= this.dirslat.length; d++){
 				
+				// Decide which direction we want to look at from this pixel
 				new_dir = (last_dir + d + 4) % 8;
 
@@ -165,4 +169,7 @@
 				
 				if(!bbox.contains(geo[0], geo[1])){
+					/**
+					 * TODO: Handle this case
+					 */
 					System.out.println("Outside bbox");
 					break;
@@ -182,15 +189,20 @@
 			// Remember this direction
 			last_dir = new_dir;
+			
+			// Set the pixel we found as current
 			xy[0] = test_x;
 			xy[1] = test_y;
 			
+			// Break the loop if we managed to get back to our starting point
 			if(xy[0] == startxy[0] && xy[1] == startxy[1]){
 				break;
 			}
 			
+			// Store this node
 			double[] geo = xy_to_geo(xy[0],xy[1],this.resolution);
 			nodelist.add(geo);
 			System.out.println("Adding node at "+xy[0]+","+xy[1]+" ("+geo[1]+","+geo[0]+")");
 			
+			// Check if we got stuck in a loop 
 	        double start_proximity = Math.pow((geo[0] - startgeo[0]),2) + Math.pow((geo[1] - startgeo[1]),2);
 	        
Index: /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java
===================================================================
--- /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java	(revision 6913)
+++ /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java	(revision 6914)
@@ -150,4 +150,6 @@
 	 */
 	
+	setStatus("Running vertex reduction...");
+	
 	nodelist = lw.vertex_reduce(nodelist, epsilon);
 	
@@ -155,6 +157,8 @@
 	
 	/**
-	 * And then through douglas-peucker reduction
-	 */
+	 * And then through douglas-peucker approximation
+	 */
+	
+	setStatus("Running Douglas-Peucker approximation...");
 	
 	nodelist = lw.douglas_peucker(nodelist, epsilon);
@@ -266,4 +270,7 @@
   public void mouseReleased(MouseEvent e) {
   }
-  
+  protected void setStatus(String s) {
+	  Main.pleaseWaitDlg.currentAction.setText(s);
+	  Main.pleaseWaitDlg.repaint();
+  }
 }
Index: /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerWMS.java
===================================================================
--- /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerWMS.java	(revision 6913)
+++ /applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerWMS.java	(revision 6914)
@@ -11,14 +11,16 @@
 import java.awt.image.*;
 import java.awt.geom.*;
+import java.util.*;
 
 public class LakewalkerWMS {
-	
-	public LakewalkerWMS(){
-		
-	}
 	
 	private BufferedImage image;
 	private int imagex;
 	private int imagey;
+	
+	// Vector to cache images in memory
+	private Vector<BufferedImage> images = new Vector<BufferedImage>();
+	// Hashmap to hold the mapping of cached images 
+	private HashMap<String,Integer> imageindex = new HashMap<String,Integer>();
 	
 	public BufferedImage image2 = new BufferedImage(2000, 2000, BufferedImage.TYPE_INT_RGB);
@@ -63,8 +65,23 @@
         File file = new File(this.working_dir,filename);
         
+        // Calculate the hashmap key
+    	String hashkey = Integer.toString(bottom_left_xy[0])+":"+Integer.toString(bottom_left_xy[1]);
+    	
         // See if this image is already loaded
-        if(this.image != null){
+        if(this.image != null){  
         	if(this.imagex != bottom_left_xy[0] || this.imagey != bottom_left_xy[1]){
-        		this.image = null;
+        		
+        		// Check if this image exists in the hashmap
+        		if(this.imageindex.containsKey(hashkey)){
+        			// Store which image we have
+        			this.imagex = bottom_left_xy[0];
+        			this.imagey = bottom_left_xy[1];
+        			
+        			// Retrieve from cache
+        			this.image = this.images.get(this.imageindex.get(hashkey));
+        			return this.image;
+        		} else {
+        			this.image = null;
+        		}
         	} else {
         		return this.image;
@@ -73,9 +90,12 @@
         
 	    try {	    	
-	    	System.out.println("Looking for image in cache: "+filename);
+	    	System.out.println("Looking for image in disk cache: "+filename);
 	    	
 	        // Read from a file
 	        this.image = ImageIO.read(file);
 	    
+	        this.images.add(this.image);
+	        this.imageindex.put(hashkey,this.images.size()-1);
+	        
 	    } catch(FileNotFoundException e){
 	    	System.out.println("Could not find cached image, downloading.");
@@ -104,4 +124,7 @@
 		    }
 	        
+	        this.images.add(this.image);
+	        this.imageindex.put(hashkey,this.images.size()-1);
+	        
 	        this.saveimage(file,this.image);
 	    }
