Index: applications/editors/josm/plugins/livegps/livegps/LiveGpsPlugin.java
===================================================================
--- applications/editors/josm/plugins/livegps/livegps/LiveGpsPlugin.java	(revision 6160)
+++ applications/editors/josm/plugins/livegps/livegps/LiveGpsPlugin.java	(revision 6161)
@@ -2,10 +2,9 @@
 
 import static org.openstreetmap.josm.tools.I18n.tr;
+
 import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
 import java.awt.event.KeyEvent;
 import java.beans.PropertyChangeListener;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
 
@@ -14,11 +13,10 @@
 import javax.swing.JMenuBar;
 import javax.swing.JMenuItem;
-import javax.swing.KeyStroke;
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.JosmAction;
+import org.openstreetmap.josm.data.gpx.GpxData;
 import org.openstreetmap.josm.gui.MapFrame;
-import org.openstreetmap.josm.gui.layer.RawGpsLayer.GpsPoint;
 import org.openstreetmap.josm.plugins.Plugin;
-import org.openstreetmap.josm.actions.JosmAction;
 
 public class LiveGpsPlugin extends Plugin
@@ -33,41 +31,41 @@
     List<PropertyChangeListener>listenerQueue;
     
-	private Collection<Collection<GpsPoint>> data = new ArrayList<Collection<GpsPoint>>();
+	private GpxData data = new GpxData();
     private LiveGpsLayer lgpslayer;
     
 	
-	public class CaptureAction extends JosmAction {
-	public CaptureAction() {
-		super(tr("Capture GPS Track"), "capturemenu", tr("Connect to gpsd server and show current position in LiveGPS layer."), KeyEvent.VK_R, KeyEvent.ALT_MASK, true);
-	}
+    public class CaptureAction extends JosmAction {
+        public CaptureAction() {
+            super(tr("Capture GPS Track"), "capturemenu", tr("Connect to gpsd server and show current position in LiveGPS layer."), KeyEvent.VK_R, KeyEvent.ALT_MASK, true);
+        }
 
-	public void actionPerformed(ActionEvent e) {
-		enableTracking(lgpscapture.isSelected());
-	}
-	}
+        public void actionPerformed(ActionEvent e) {
+            enableTracking(lgpscapture.isSelected());
+        }
+    }
 
-	public class CenterAction extends JosmAction {
-	public CenterAction() {
-		super(tr("Center Once"), "centermenu", tr("Center the LiveGPS layer to current position."), KeyEvent.VK_C, 0, true);
-	}
+    public class CenterAction extends JosmAction {
+        public CenterAction() {
+            super(tr("Center Once"), "centermenu", tr("Center the LiveGPS layer to current position."), KeyEvent.VK_C, 0, true);
+        }
 
-	public void actionPerformed(ActionEvent e) {
-		if(lgpslayer != null) {
-			lgpslayer.center();
-		}
-	}
-	}
+        public void actionPerformed(ActionEvent e) {
+            if(lgpslayer != null) {
+                lgpslayer.center();
+            }
+        }
+    }
 
-	public class AutoCenterAction extends JosmAction {
-	public AutoCenterAction() {
-		super(tr("Auto-Center"), "autocentermenu", tr("Continuously center the LiveGPS layer to current position."), KeyEvent.VK_HOME, 0, true);
-	}
+    public class AutoCenterAction extends JosmAction {
+        public AutoCenterAction() {
+            super(tr("Auto-Center"), "autocentermenu", tr("Continuously center the LiveGPS layer to current position."), KeyEvent.VK_HOME, 0, true);
+        }
 
-	public void actionPerformed(ActionEvent e) {
-		if(lgpslayer != null) {
-			lgpslayer.center();
-		}
-	}
-	}
+        public void actionPerformed(ActionEvent e) {
+            if(lgpslayer != null) {
+                lgpslayer.center();
+            }
+        }
+    }
 
     public LiveGpsPlugin() 
@@ -79,7 +77,7 @@
         
         JosmAction captureAction = new CaptureAction();
-        JCheckBoxMenuItem captureMenu = new JCheckBoxMenuItem(captureAction);
-        lgpsmenu.add(captureMenu);  
-        captureMenu.setAccelerator(captureAction.shortCut);
+        lgpscapture = new JCheckBoxMenuItem(captureAction);
+        lgpsmenu.add(lgpscapture);  
+        lgpscapture.setAccelerator(captureAction.shortCut);
 
         JosmAction centerAction = new CenterAction();
@@ -89,7 +87,7 @@
 
         JosmAction autoCenterAction = new AutoCenterAction();
-        JCheckBoxMenuItem autoCenterMenu = new JCheckBoxMenuItem(autoCenterAction);
-        lgpsmenu.add(autoCenterMenu);  
-        autoCenterMenu.setAccelerator(autoCenterAction.shortCut);
+        lgpsautocenter = new JCheckBoxMenuItem(autoCenterAction);
+        lgpsmenu.add(lgpsautocenter);  
+        lgpsautocenter.setAccelerator(autoCenterAction.shortCut);
     }
     
