Index: src/org/openstreetmap/josm/Main.java
===================================================================
--- src/org/openstreetmap/josm/Main.java	(revision 145)
+++ src/org/openstreetmap/josm/Main.java	(revision 146)
@@ -31,4 +31,5 @@
 
 import org.openstreetmap.josm.actions.AboutAction;
+import org.openstreetmap.josm.actions.AlignInCircleAction;
 import org.openstreetmap.josm.actions.DownloadAction;
 import org.openstreetmap.josm.actions.ExitAction;
@@ -174,4 +175,5 @@
 		annotationTesterAction.putValue(Action.SMALL_ICON, ImageProvider.get("annotation-tester"));
 		final Action reverseSegmentAction = new ReverseSegmentAction();
+		final Action alignInCircleAction = new AlignInCircleAction();
 		final Action uploadAction = new UploadAction();
 		final Action saveAction = new SaveAction();
@@ -211,4 +213,5 @@
 		editMenu.addSeparator();
 		editMenu.add(reverseSegmentAction);
+		editMenu.add(alignInCircleAction);
 		editMenu.addSeparator();
 		editMenu.add(preferencesAction);
@@ -239,6 +242,4 @@
 		toolBar.add(undoAction);
 		toolBar.add(redoAction);
-		toolBar.addSeparator();
-		toolBar.add(reverseSegmentAction);
 		toolBar.addSeparator();
 		toolBar.add(preferencesAction);
Index: src/org/openstreetmap/josm/actions/AlignInCircleAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/AlignInCircleAction.java	(revision 146)
+++ src/org/openstreetmap/josm/actions/AlignInCircleAction.java	(revision 146)
@@ -0,0 +1,73 @@
+package org.openstreetmap.josm.actions;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.KeyEvent;
+import java.util.Collection;
+import java.util.LinkedList;
+
+import javax.swing.JOptionPane;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.command.Command;
+import org.openstreetmap.josm.command.MoveCommand;
+import org.openstreetmap.josm.command.SequenceCommand;
+import org.openstreetmap.josm.data.coor.EastNorth;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.data.osm.Node;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+
+/**
+ * Aligns all selected nodes within a circle. (Usefull for roundabouts)
+ * 
+ * @author Matthew Newton
+ */
+public final class AlignInCircleAction extends JosmAction {
+
+	public AlignInCircleAction() {
+		super(tr("Align Nodes in Circle"), "aligncircle", tr("Move the selected nodes into a circle."), KeyEvent.VK_O, KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK);
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		Collection<OsmPrimitive> sel = Main.ds.getSelected();
+		Collection<Node> nodes = new LinkedList<Node>();
+		for (OsmPrimitive osm : sel)
+			if (osm instanceof Node)
+				nodes.add((Node)osm);
+		if (nodes.size() < 4) {
+			JOptionPane.showMessageDialog(Main.parent, tr("Please select at least four nodes."));
+			return;
+		}
+
+		// Get average position of all nodes
+		Node avn = new Node(new LatLon(0,0));
+		for (Node n : nodes) {
+			avn.eastNorth = new EastNorth(avn.eastNorth.east()+n.eastNorth.east(), avn.eastNorth.north()+n.eastNorth.north());
+			avn.coor = Main.proj.eastNorth2latlon(avn.eastNorth);
+		}
+		avn.eastNorth = new EastNorth(avn.eastNorth.east()/nodes.size(), avn.eastNorth.north()/nodes.size());
+		avn.coor = Main.proj.eastNorth2latlon(avn.eastNorth);
+		// Node "avn" now is central to all selected nodes.
+
+		// Now calculate the average distance to each node from the
+		// centre.
+		double avdist = 0;
+		for (Node n : nodes)
+			avdist += Math.sqrt(avn.eastNorth.distance(n.eastNorth));
+		avdist = avdist / nodes.size();
+
+		Collection<Command> cmds = new LinkedList<Command>();
+		// Move each node to that distance from the centre.
+		for (Node n : nodes) {
+			double dx = n.eastNorth.east() - avn.eastNorth.east();
+			double dy = n.eastNorth.north() - avn.eastNorth.north();
+			double dist = Math.sqrt(avn.eastNorth.distance(n.eastNorth));
+			cmds.add(new MoveCommand(n, (dx * (avdist / dist)) - dx, (dy * (avdist / dist)) - dy));
+		}
+
+		Main.main.editLayer().add(new SequenceCommand(tr("Align Nodes in Circle"), cmds));
+		Main.ds.setSelected(avn);
+		Main.map.repaint();
+	}
+}
Index: src/org/openstreetmap/josm/actions/ExternalToolsAction.java
===================================================================
--- src/org/openstreetmap/josm/actions/ExternalToolsAction.java	(revision 145)
+++ src/org/openstreetmap/josm/actions/ExternalToolsAction.java	(revision 146)
@@ -76,5 +76,28 @@
 				final boolean addGpx = flags.contains("gpx");
 
-				AddVisitor adder = new AddVisitor(fromDataSet, flags.contains("include_references"));
+				AddVisitor adder = new AddVisitor(fromDataSet);
+				if (flags.contains("include_references")) {
+					adder = new AddVisitor(fromDataSet){
+						@Override public void visit(Node n) {
+							if (!ds.nodes.contains(n))
+								super.visit(n);
+                        }
+						@Override public void visit(Segment s) {
+	                        super.visit(s);
+	                		if (!s.incomplete) {
+	                			if (!ds.nodes.contains(s.from))
+	                				s.from.visit(this);
+	                			if (!ds.nodes.contains(s.to))
+	                				s.to.visit(this);
+	                		}
+                        }
+						@Override public void visit(Way w) {
+	                        super.visit(w);
+	            			for (Segment s : w.segments)
+	            				if (!ds.segments.contains(s))
+	            					s.visit(this);
+                        }
+					};
+				}
 				if (input.contains("selection")) {
 					Collection<OsmPrimitive> sel = Main.ds.getSelected();
Index: src/org/openstreetmap/josm/command/Command.java
===================================================================
--- src/org/openstreetmap/josm/command/Command.java	(revision 145)
+++ src/org/openstreetmap/josm/command/Command.java	(revision 146)
@@ -2,11 +2,16 @@
 
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Map;
 import java.util.Map.Entry;
 
 import javax.swing.tree.MutableTreeNode;
 
+import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
-import org.openstreetmap.josm.data.osm.visitor.CloneVisitor;
+import org.openstreetmap.josm.data.osm.Segment;
+import org.openstreetmap.josm.data.osm.Way;
+import org.openstreetmap.josm.data.osm.visitor.Visitor;
 
 
@@ -23,4 +28,18 @@
 abstract public class Command {
 
+	private static final class CloneVisitor implements Visitor {
+		public Map<OsmPrimitive, OsmPrimitive> orig = new HashMap<OsmPrimitive, OsmPrimitive>();
+		
+		public void visit(Node n) {
+			orig.put(n, new Node(n));
+	    }
+		public void visit(Segment s) {
+			orig.put(s, new Segment(s));
+	    }
+		public void visit(Way w) {
+			orig.put(w, new Way(w));
+	    }
+	}
+	
 	private CloneVisitor orig; 
 	
Index: src/org/openstreetmap/josm/command/MoveCommand.java
===================================================================
--- src/org/openstreetmap/josm/command/MoveCommand.java	(revision 145)
+++ src/org/openstreetmap/josm/command/MoveCommand.java	(revision 146)
@@ -4,4 +4,5 @@
 import static org.openstreetmap.josm.tools.I18n.trn;
 
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Iterator;
@@ -56,4 +57,8 @@
 	private List<OldState> oldState = new LinkedList<OldState>();
 
+	
+	public MoveCommand(OsmPrimitive osm, double x, double y) {
+		this(Arrays.asList(new OsmPrimitive[]{osm}), x, y);
+	}
 	/**
 	 * Create a MoveCommand and assign the initial object set and movement vector.
Index: src/org/openstreetmap/josm/data/osm/visitor/AddVisitor.java
===================================================================
--- src/org/openstreetmap/josm/data/osm/visitor/AddVisitor.java	(revision 145)
+++ src/org/openstreetmap/josm/data/osm/visitor/AddVisitor.java	(revision 146)
@@ -17,35 +17,18 @@
 public class AddVisitor implements Visitor {
 	
-	private final DataSet ds;
-	private final boolean includeReferences;
-	
-	public AddVisitor(DataSet ds, boolean includeReferences) {
-		this.ds = ds;
-		this.includeReferences = includeReferences;
-	}
+	protected final DataSet ds;
 	
 	public AddVisitor(DataSet ds) {
-		this(ds, false);
+		this.ds = ds;
 	}
 	
 	public void visit(Node n) {
-		if (!includeReferences || !ds.nodes.contains(n))
-			ds.nodes.add(n);
+		ds.nodes.add(n);
 	}
 	public void visit(Segment s) {
 		ds.segments.add(s);
-		if (includeReferences && !s.incomplete) {
-			if (!ds.nodes.contains(s.from))
-				s.from.visit(this);
-			if (!ds.nodes.contains(s.to))
-				s.to.visit(this);
-		}
 	}
 	public void visit(Way w) {
 		ds.ways.add(w);
-		if (includeReferences)
-			for (Segment s : w.segments)
-				if (!ds.segments.contains(s))
-					s.visit(this);
 	}
 }
Index: src/org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java
===================================================================
--- src/org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java	(revision 145)
+++ src/org/openstreetmap/josm/data/osm/visitor/BoundingXYVisitor.java	(revision 146)
@@ -9,6 +9,6 @@
 
 /**
- * Calculates the total bounding rectangle of a serie of OsmPrimitives, using the EastNorth values
- * as reference.
+ * Calculates the total bounding rectangle of a serie of OsmPrimitives, using the 
+ * EastNorth values as reference.
  * @author imi
  */
Index: src/org/openstreetmap/josm/data/osm/visitor/CloneVisitor.java
===================================================================
--- src/org/openstreetmap/josm/data/osm/visitor/CloneVisitor.java	(revision 145)
+++ 	(revision )
@@ -1,24 +1,0 @@
-package org.openstreetmap.josm.data.osm.visitor;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.openstreetmap.josm.data.osm.Node;
-import org.openstreetmap.josm.data.osm.OsmPrimitive;
-import org.openstreetmap.josm.data.osm.Segment;
-import org.openstreetmap.josm.data.osm.Way;
-
-public class CloneVisitor implements Visitor {
-	
-	public Map<OsmPrimitive, OsmPrimitive> orig = new HashMap<OsmPrimitive, OsmPrimitive>();
-	
-	public void visit(Node n) {
-		orig.put(n, new Node(n));
-    }
-	public void visit(Segment s) {
-		orig.put(s, new Segment(s));
-    }
-	public void visit(Way w) {
-		orig.put(w, new Way(w));
-    }
-}
