Index: /applications/editors/josm/plugins/michigan_left/build.xml
===================================================================
--- /applications/editors/josm/plugins/michigan_left/build.xml	(revision 33879)
+++ /applications/editors/josm/plugins/michigan_left/build.xml	(revision 33880)
@@ -4,5 +4,5 @@
     <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="10580"/>
+    <property name="plugin.main.version" value="12643"/>
     	
     <!-- Configure these properties (replace "..." accordingly).
Index: /applications/editors/josm/plugins/michigan_left/src/MichiganLeft/MichiganLeft.java
===================================================================
--- /applications/editors/josm/plugins/michigan_left/src/MichiganLeft/MichiganLeft.java	(revision 33879)
+++ /applications/editors/josm/plugins/michigan_left/src/MichiganLeft/MichiganLeft.java	(revision 33880)
@@ -20,4 +20,5 @@
 import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.command.SequenceCommand;
+import org.openstreetmap.josm.data.osm.DataSet;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -25,4 +26,5 @@
 import org.openstreetmap.josm.data.osm.RelationMember;
 import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.gui.MainApplication;
 import org.openstreetmap.josm.gui.MainMenu;
 import org.openstreetmap.josm.plugins.Plugin;
@@ -43,8 +45,8 @@
     public MichiganLeft(PluginInformation info) {
         super(info);
-        MichiganLeft = MainMenu.add(Main.main.menu.dataMenu, new MichiganLeftAction());
+        MichiganLeft = MainMenu.add(MainApplication.getMenu().dataMenu, new MichiganLeftAction());
     }
 
-    private class MichiganLeftAction extends JosmAction {
+    private static class MichiganLeftAction extends JosmAction {
         private LinkedList<Command> cmds = new LinkedList<>();
 
@@ -58,5 +60,6 @@
         @Override
         public void actionPerformed(ActionEvent e) {
-            Collection<OsmPrimitive> mainSelection = Main.getLayerManager().getEditDataSet().getSelected();
+            DataSet ds = MainApplication.getLayerManager().getEditDataSet();
+            Collection<OsmPrimitive> mainSelection = ds.getSelected();
 
             ArrayList<OsmPrimitive> selection = new ArrayList<>();
@@ -125,5 +128,5 @@
                     Node lastNode = firstWay.lastNode();
 
-                    buildRelation(firstWay, lastWay, lastNode);
+                    cmds.add(new AddCommand(ds, buildRelation(firstWay, lastWay, lastNode)));
                 }
                 Command c = new SequenceCommand(tr("Create Michigan left turn restriction"), cmds);
@@ -203,11 +206,11 @@
             if (hash.containsKey(node)) {
                 Integer nb = hash.get(node);
-                hash.put(node, new Integer(nb.intValue() + 1));
+                hash.put(node, Integer.valueOf(nb.intValue() + 1));
             } else {
-                hash.put(node, new Integer(1));
-            }
-        }
-
-        public void buildRelation(Way fromWay, Way toWay, Node viaNode) {
+                hash.put(node, Integer.valueOf(1));
+            }
+        }
+
+        public Relation buildRelation(Way fromWay, Way toWay, Node viaNode) {
             Relation relation = new Relation();
 
@@ -224,5 +227,5 @@
             relation.put("restriction", "no_left_turn");
 
-            cmds.add(new AddCommand(relation));
+            return relation;
         }
 
