Index: applications/editors/josm/plugins/ext_tools/src/ext_tools/DataSetToCmd.java
===================================================================
--- applications/editors/josm/plugins/ext_tools/src/ext_tools/DataSetToCmd.java	(revision 34987)
+++ applications/editors/josm/plugins/ext_tools/src/ext_tools/DataSetToCmd.java	(revision 34988)
@@ -75,10 +75,6 @@
     }
 
-    private OsmPrimitive getMergeTarget(OsmPrimitive mergeSource)
-            throws IllegalStateException {
-        OsmPrimitive target = mergedMap.get(mergeSource.getPrimitiveId());
-        if (target == null)
-            return null;
-        return target;
+    private OsmPrimitive getMergeTarget(OsmPrimitive mergeSource) {
+        return mergedMap.get(mergeSource.getPrimitiveId());
     }
 
@@ -103,15 +99,11 @@
      * @throws IllegalStateException
      *             thrown if no target way can be found for the source way
-     * @throws IllegalStateException
-     *             thrown if there isn't a target node for one of the nodes in
+     *             or if there isn't a target node for one of the nodes in
      *             the source way
      *
      */
-    private void mergeNodeList(Way source) throws IllegalStateException {
+    private void mergeNodeList(Way source) {
         Way target = (Way) getMergeTarget(source);
-        if (target == null)
-            throw new IllegalStateException(tr(
-                    "Missing merge target for way with id {0}", source.getUniqueId()));
-        if (target.getDataSet() != null)
+        if (target == null || target.getDataSet() != null)
             throw new IllegalStateException(tr(
                     "Missing merge target for way with id {0}", source.getUniqueId()));
@@ -120,15 +112,11 @@
         for (Node sourceNode : source.getNodes()) {
             Node targetNode = (Node) getMergeTarget(sourceNode);
-            if (targetNode == null)
+            if (targetNode == null || targetNode.getDataSet() != null)
                 throw new IllegalStateException(tr(
                         "Missing merge target for node with id {0}", sourceNode
                                 .getUniqueId()));
-            if (targetNode.getDataSet() != null)
-                throw new IllegalStateException(tr(
-                        "Missing merge target for way with id {0}", source.getUniqueId()));
-
             newNodes.add(targetNode);
         }
-        cmds.add(new ChangeNodesCommand(target, newNodes));
+        cmds.add(new ChangeNodesCommand(MainApplication.getLayerManager().getEditDataSet(), target, newNodes));
     }
 
Index: applications/editors/josm/plugins/ext_tools/src/ext_tools/preferences/EditToolDialog.java
===================================================================
--- applications/editors/josm/plugins/ext_tools/src/ext_tools/preferences/EditToolDialog.java	(revision 34987)
+++ applications/editors/josm/plugins/ext_tools/src/ext_tools/preferences/EditToolDialog.java	(revision 34988)
@@ -20,5 +20,5 @@
 
 public class EditToolDialog extends ExtendedDialog {
-    private ExtTool tool;
+    private final transient ExtTool tool;
 
     private JPanel panel = new JPanel(new GridBagLayout());
@@ -48,5 +48,5 @@
                 true);
         contentInsets = new Insets(15, 15, 5, 15);
-        setButtonIcons(new String[] { "ok.png", "cancel.png" });
+        setButtonIcons("ok.png", "cancel.png");
 
         this.tool = tool;
Index: applications/editors/josm/plugins/ext_tools/src/ext_tools/preferences/MyToolsPanel.java
===================================================================
--- applications/editors/josm/plugins/ext_tools/src/ext_tools/preferences/MyToolsPanel.java	(revision 34987)
+++ applications/editors/josm/plugins/ext_tools/src/ext_tools/preferences/MyToolsPanel.java	(revision 34988)
@@ -6,6 +6,4 @@
 import java.awt.GridBagLayout;
 import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
 
 import javax.swing.JButton;
@@ -18,7 +16,8 @@
 import ext_tools.ToolsInformation;
 import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.tools.Utils;
 
 public class MyToolsPanel extends JPanel {
-    ToolsInformation tools;
+	private final transient ToolsInformation tools;
 
     public MyToolsPanel(ToolsInformation tools) {
@@ -49,31 +48,25 @@
 
             final JButton bEdit = new JButton(tr("Edit"));
-            bEdit.addActionListener(new ActionListener() {
-                @Override
-                public void actionPerformed(ActionEvent arg0) {
-                    JDialog dlg = new EditToolDialog(tool);
-                    dlg.setVisible(true);
-                    dlg.dispose();
-                    refresh();
-                }
-            });
+            bEdit.addActionListener(e -> {
+			    JDialog dlg = new EditToolDialog(tool);
+			    dlg.setVisible(true);
+			    dlg.dispose();
+			    refresh();
+			});
             add(bEdit, gbc);
 
             gbc.gridx = 2;
             final JButton bDel = new JButton("X");
-            bDel.addActionListener(new ActionListener() {
-                @Override
-                public void actionPerformed(ActionEvent arg0) {
-                    if (JOptionPane.showConfirmDialog(MainApplication.getMainFrame(),
-                            tr("Delete tool \"{0}\"?", tool.name),
-                            tr("Are you sure?"),
-                            JOptionPane.YES_NO_OPTION,
-                            JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION)
-                    {
-                        tools.removeTool(tool);
-                        refresh();
-                    }
-                }
-            });
+            bDel.addActionListener(e -> {
+			    if (JOptionPane.showConfirmDialog(MainApplication.getMainFrame(),
+			            tr("Delete tool \"{0}\"?", tool.name),
+			            tr("Are you sure?"),
+			            JOptionPane.YES_NO_OPTION,
+			            JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION)
+			    {
+			        tools.removeTool(tool);
+			        refresh();
+			    }
+			});
             add(bDel, gbc);
 
@@ -85,18 +78,15 @@
 
         final JButton bNew = new JButton(tr("New tool..."));
-        bNew.addActionListener(new ActionListener() {
-            @Override
-            public void actionPerformed(ActionEvent arg0) {
-                ExtTool tool = new ExtTool();
-                JDialog dlg = new EditToolDialog(tool);
-                dlg.setVisible(true);
-                dlg.dispose();
-                if (tool.name != null && (!"".equals(tool.name))) {
-                    tools.addTool(tool);
-                    tool.setEnabled(true);
-                }
-                refresh();
-            }
-        });
+        bNew.addActionListener(e -> {
+		    ExtTool tool = new ExtTool();
+		    JDialog dlg = new EditToolDialog(tool);
+		    dlg.setVisible(true);
+		    dlg.dispose();
+		    if (!Utils.isStripEmpty(tool.name)) {
+		        tools.addTool(tool);
+		        tool.setEnabled(true);
+		    }
+		    refresh();
+		});
         add(bNew, gbc);
         gbc.gridy++;
Index: applications/editors/josm/plugins/ext_tools/src/ext_tools/preferences/ToolsRepositoryPanel.java
===================================================================
--- applications/editors/josm/plugins/ext_tools/src/ext_tools/preferences/ToolsRepositoryPanel.java	(revision 34987)
+++ applications/editors/josm/plugins/ext_tools/src/ext_tools/preferences/ToolsRepositoryPanel.java	(revision 34988)
@@ -20,5 +20,5 @@
 public class ToolsRepositoryPanel extends JPanel {
 
-    ToolsInformation tools;
+    private final transient ToolsInformation tools;
 
     public ToolsRepositoryPanel(ToolsInformation tools) {
