Index: applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/DoubleConfigurer.java
===================================================================
--- applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/DoubleConfigurer.java	(revision 4096)
+++ applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/DoubleConfigurer.java	(revision 4189)
@@ -19,4 +19,6 @@
 package org.openstreetmap.josm.plugins.lakewalker;
 
+import java.text.DecimalFormat;
+
 /**
  * A Configurer for Double values
@@ -24,4 +26,6 @@
 public class DoubleConfigurer extends StringConfigurer {
 
+  final static DecimalFormat df = new DecimalFormat("##0.0000000");
+  
   public DoubleConfigurer() {
     super();
@@ -33,5 +37,5 @@
 
   public DoubleConfigurer(String key, String name, Double val) {
-    super(key, name, val == null ? null : val.toString());
+    super(key, name, val == null ? null : df.format(val));
   }
 
@@ -48,10 +52,13 @@
     }
     if (!noUpdate && nameField != null) {
-      nameField.setText(d.toString());
+      nameField.setText(df.format(d));
     }
   }
 
   public String getValueString() {
-    return value == null ? null : value.toString();
+    if (value == null || value.equals("")) {
+      return (String) value;
+    }
+    return df.format(value);
   }
 }
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 4096)
+++ applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerAction.java	(revision 4189)
@@ -46,4 +46,5 @@
   protected Cursor oldCursor;
   protected List<Node> selectedNodes;
+  protected Thread executeThread;
   
   public LakewalkerAction(String name) {
@@ -52,5 +53,4 @@
     this.name = name;
     setEnabled(true);
-
   }
 
@@ -106,9 +106,6 @@
     target += " --maxnodes=" + Main.pref.get(LakewalkerPreferences.PREF_MAX_NODES, "50000");
     target += " --threshold=" + Main.pref.get(LakewalkerPreferences.PREF_THRESHOLD, "35");
+    target += " --dp-epsilon=" + Main.pref.get(LakewalkerPreferences.PREF_EPSILON, "0.0003");
     target += " --josm";
-
-
-    
-
 
     try {
@@ -118,5 +115,5 @@
       Runtime rt = Runtime.getRuntime();
       System.out.println("dir: " + working_dir + ", target: " + target);
-      Process p = rt.exec(target, null, working_dir);
+      final Process p = rt.exec(target, null, working_dir);
       final BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
       
@@ -135,8 +132,10 @@
         @Override protected void cancel() {
           reader.cancel();
-          
+          executeThread.interrupt();
+          p.destroy();
         }
       };
-      Main.worker.execute(lakewalkerTask); 
+      Thread executeThread = new Thread(lakewalkerTask);
+      executeThread.start();
     }
     catch (Exception ex) {
Index: applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerPreferences.java
===================================================================
--- applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerPreferences.java	(revision 4096)
+++ applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerPreferences.java	(revision 4189)
@@ -18,4 +18,5 @@
   public static final String PREF_MAX_NODES = "lakewalker.max_nodes";
   public static final String PREF_THRESHOLD = "lakewalker.threshold";
+  public static final String PREF_EPSILON = "lakewalker.epsilon";
   
   protected JTextField python = new JTextField(10);
@@ -23,13 +24,26 @@
   protected IntConfigurer maxNodes = new IntConfigurer();
   protected IntConfigurer threshold = new IntConfigurer();
+  protected DoubleConfigurer epsilon = new DoubleConfigurer();
   
   public void addGui(PreferenceDialog gui) {
     python.setToolTipText(tr("Path to python executable."));
-    maxSegs.setToolTipText(tr("Maximum number of segments per way."));
-    maxNodes.setToolTipText(tr("Maximum number of nodes to trace."));
-    maxNodes.setToolTipText(tr("Gray threshold."));
+    maxSegs.setToolTipText(tr("Maximum nuber of nodes allowed in one way."));
+    maxNodes.setToolTipText(tr("Maximum number of nodes to generate before bailing out (before simplifying lines)."));
+    maxNodes.setToolTipText(tr("Maximum gray value to accept as water (based on Landsat IR-1 data). Can be in the range 0-255."));
+    epsilon.setToolTipText(tr("Accuracy of Douglas-Peucker line simplification, measured in degrees. Lower values give more nodes, and more accurate lines. Defaults to 0.0003."));   
+    
     String description = tr("An interlude to the Lakewalker Python module to trace water bodies on Landsat imagery.<br><br>Version: {0}", LakewalkerPlugin.VERSION);
     
     JPanel prefPanel = gui.createPreferenceTab("lakewalker.png", I18n.tr("Lakewalker Plugin Preferences"), description);
+    buildPreferences(prefPanel);
+    
+    python.setText(Main.pref.get(PREF_PYTHON, "python.exe"));
+    maxSegs.setValue(Main.pref.get(PREF_MAX_SEG, "250"));
+    maxNodes.setValue(Main.pref.get(PREF_MAX_NODES, "50000"));
+    threshold.setValue(Main.pref.get(PREF_THRESHOLD, "35"));
+    epsilon.setValue(Main.pref.get(PREF_EPSILON, "0.0003"));
+  }
+  
+  public void buildPreferences(JPanel prefPanel) {
     prefPanel.add(new JLabel(tr("Python executable")), GBC.std().insets(10,5,5,0));
     prefPanel.add(python, GBC.eol().insets(0,5,0,0).fill(GBC.HORIZONTAL));
@@ -40,9 +54,7 @@
     prefPanel.add(new JLabel(tr("Maximum gray value to count as water")), GBC.std().insets(10,5,5,0));
     prefPanel.add(threshold.getControls(), GBC.eol().insets(0,5,0,0).fill(GBC.HORIZONTAL));
-       
-    python.setText(Main.pref.get(PREF_PYTHON, "python.exe"));
-    maxSegs.setValue(Main.pref.get(PREF_MAX_SEG, "250"));
-    maxNodes.setValue(Main.pref.get(PREF_MAX_NODES, "50000"));
-    threshold.setValue(Main.pref.get(PREF_THRESHOLD, "35"));
+    prefPanel.add(new JLabel(tr("Line simplification accuracy, measured in degrees.")), GBC.std().insets(10,5,5,0));
+    prefPanel.add(epsilon.getControls(), GBC.eol().insets(0,5,0,0).fill(GBC.HORIZONTAL));
+
   }
 
@@ -52,4 +64,5 @@
     Main.pref.put(PREF_MAX_NODES, maxNodes.getValueString());
     Main.pref.put(PREF_THRESHOLD, threshold.getValueString());
+    Main.pref.put(PREF_EPSILON, epsilon.getValueString());
   }
   
Index: applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerReader.java
===================================================================
--- applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerReader.java	(revision 4096)
+++ applications/editors/josm/plugins/lakewalker/src/org/openstreetmap/josm/plugins/lakewalker/LakewalkerReader.java	(revision 4189)
@@ -89,4 +89,5 @@
           commands.add(new AddCommand(s));
           way.segments.add(s);
+          way.put("created_by", "Dshpak_landsat_lakes");
           commands.add(new AddCommand(way));
           break;
@@ -103,6 +104,4 @@
       Main.ds.setSelected(ways);
     }
-
-
   }
   
