Index: applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/GameWindow.java
===================================================================
--- applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/GameWindow.java	(revision 32322)
+++ applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/GameWindow.java	(revision 32518)
@@ -130,5 +130,5 @@
                         new HashMap<String, Object>()));
 
-            ground_view.parent.addLayer(
+            ground_view.parent.getLayerManager().addLayer(
                     new GpxLayer(data, "Car GPS trace"));
         }
Index: applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/WMSRacer.java
===================================================================
--- applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/WMSRacer.java	(revision 32322)
+++ applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/WMSRacer.java	(revision 32518)
@@ -16,11 +16,15 @@
 import org.openstreetmap.josm.actions.JosmAction;
 import org.openstreetmap.josm.gui.MapFrame;
-import org.openstreetmap.josm.gui.MapView;
-import org.openstreetmap.josm.gui.MapView.LayerChangeListener;
 import org.openstreetmap.josm.gui.layer.Layer;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent;
+import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent;
+import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent;
+import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener;
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
 
-public class WMSRacer extends Plugin implements LayerChangeListener {
+public class WMSRacer extends Plugin implements LayerChangeListener, ActiveLayerChangeListener {
     public WMSRacer(PluginInformation info) {
         super(info);
@@ -47,4 +51,5 @@
         }
 
+        @Override
         public void actionPerformed(ActionEvent ev) {
             if (groundLayer == null ||
@@ -55,4 +60,5 @@
         }
 
+        @Override
         public void updateEnabledState() {
             if (frame == null) {
@@ -80,5 +86,5 @@
              * horizontal scanlines (lines equidistant from
              * camera eye)) */
-            for (Layer l : frame.mapView.getAllLayers())
+            for (Layer l : frame.mapView.getLayerManager().getLayers())
                 if (l.isBackgroundLayer()) {
                     groundLayer = l;
@@ -94,27 +100,39 @@
     protected DriveAction driveAction = new DriveAction();
 
+    @Override
     public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
-        if (oldFrame != null)
-            MapView.removeLayerChangeListener(this);
+        if (oldFrame != null) {
+            Main.getLayerManager().removeLayerChangeListener(this);
+            Main.getLayerManager().removeActiveLayerChangeListener(this);
+        }
 
         driveAction.frame = newFrame;
         driveAction.updateEnabledState();
 
-        if (newFrame != null)
-            MapView.addLayerChangeListener(this);
+        if (newFrame != null) {
+            Main.getLayerManager().addLayerChangeListener(this);
+            Main.getLayerManager().addActiveLayerChangeListener(this);
+        }
     }
 
-    /* LayerChangeListener methods */
-    public void activeLayerChange(Layer oldLayer, Layer newLayer) {
-        driveAction.currentLayer = newLayer;
+    @Override
+    public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) {
+        driveAction.currentLayer = Main.getLayerManager().getActiveLayer();
         driveAction.updateEnabledState();
     }
 
-    public void layerAdded(Layer newLayer) {
+    @Override
+    public void layerAdded(LayerAddEvent e) {
         driveAction.updateEnabledState();
     }
 
-    public void layerRemoved(Layer oldLayer) {
+    @Override
+    public void layerRemoving(LayerRemoveEvent e) {
         driveAction.updateEnabledState();
     }
+
+    @Override
+    public void layerOrderChanged(LayerOrderChangeEvent e) {
+        // Do nothing
+    }
 }
