Index: trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 3832)
+++ trunk/src/org/openstreetmap/josm/actions/AddImageryLayerAction.java	(revision 3835)
@@ -25,6 +25,5 @@
     public void actionPerformed(ActionEvent e) {
         if (!isEnabled()) return;
-        ImageryLayer wmsLayer = ImageryLayer.create(info);
-        Main.main.addLayer(wmsLayer);
+        Main.main.addLayer(ImageryLayer.create(info));
     }
 
Index: trunk/src/org/openstreetmap/josm/actions/DeleteAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/DeleteAction.java	(revision 3832)
+++ trunk/src/org/openstreetmap/josm/actions/DeleteAction.java	(revision 3835)
@@ -26,6 +26,5 @@
         if(!Main.map.mapView.isActiveLayerVisible())
             return;
-        new org.openstreetmap.josm.actions.mapmode.DeleteAction(Main.map)
-        .doActionPerformed(e);
+        org.openstreetmap.josm.actions.mapmode.DeleteAction.doActionPerformed(e);
     }
 
Index: trunk/src/org/openstreetmap/josm/actions/JosmAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 3832)
+++ trunk/src/org/openstreetmap/josm/actions/JosmAction.java	(revision 3835)
@@ -127,5 +127,5 @@
      * @return the current edit layer. null, if no edit layer exists
      */
-    protected OsmDataLayer getEditLayer() {
+    protected static OsmDataLayer getEditLayer() {
         return Main.main.getEditLayer();
     }
@@ -136,5 +136,5 @@
      * @return the current dataset. null, if no current dataset exists
      */
-    protected DataSet getCurrentDataSet() {
+    protected static DataSet getCurrentDataSet() {
         return Main.main.getCurrentDataSet();
     }
Index: trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java	(revision 3832)
+++ trunk/src/org/openstreetmap/josm/actions/mapmode/DeleteAction.java	(revision 3835)
@@ -133,10 +133,8 @@
     @Override public void actionPerformed(ActionEvent e) {
         super.actionPerformed(e);
-        if(!Main.map.mapView.isActiveLayerDrawable())
-            return;
         doActionPerformed(e);
     }
 
-    public void doActionPerformed(ActionEvent e) {
+    static public void doActionPerformed(ActionEvent e) {
         if(!Main.map.mapView.isActiveLayerDrawable())
             return;
