Index: /applications/editors/josm/plugins/wms-turbo-challenge2/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- /applications/editors/josm/plugins/wms-turbo-challenge2/.settings/org.eclipse.jdt.core.prefs	(revision 32517)
+++ /applications/editors/josm/plugins/wms-turbo-challenge2/.settings/org.eclipse.jdt.core.prefs	(revision 32518)
@@ -81,4 +81,5 @@
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
 org.eclipse.jdt.core.compiler.problem.unusedImport=warning
 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
Index: /applications/editors/josm/plugins/wms-turbo-challenge2/.settings/org.eclipse.jdt.ui.prefs
===================================================================
--- /applications/editors/josm/plugins/wms-turbo-challenge2/.settings/org.eclipse.jdt.ui.prefs	(revision 32518)
+++ /applications/editors/josm/plugins/wms-turbo-challenge2/.settings/org.eclipse.jdt.ui.prefs	(revision 32518)
@@ -0,0 +1,60 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=true
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+sp_cleanup.use_type_arguments=false
Index: /applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/GameWindow.java
===================================================================
--- /applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/GameWindow.java	(revision 32517)
+++ /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 32517)
+++ /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
+    }
 }
