Index: applications/editors/josm/plugins/routing/build.xml
===================================================================
--- applications/editors/josm/plugins/routing/build.xml	(revision 15106)
+++ applications/editors/josm/plugins/routing/build.xml	(revision 15707)
@@ -44,5 +44,5 @@
                 <attribute name="Plugin-Description" value="Provides routing capabilities."/>
                 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Routing"/>
-                <attribute name="Plugin-Mainversion" value="1510"/>
+                <attribute name="Plugin-Mainversion" value="1646"/>
                 <attribute name="Plugin-Stage" value="50"/>
                 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/EdgeIterator.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/EdgeIterator.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/EdgeIterator.java	(revision 15707)
@@ -3,7 +3,7 @@
 public interface EdgeIterator {
 
-	public boolean hasNext();
-	
-	public RoutingEdge next();
+    public boolean hasNext();
+    
+    public RoutingEdge next();
 
 }
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/PreferencesKeys.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/PreferencesKeys.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/PreferencesKeys.java	(revision 15707)
@@ -28,14 +28,14 @@
 
 public enum PreferencesKeys {
-	KEY_ACTIVE_ROUTE_COLOR ("routing.active.route.color"),
-	KEY_INACTIVE_ROUTE_COLOR ("routing.inactive.route.color"),
-	KEY_ROUTE_WIDTH ("routing.route.width"),
-	KEY_ROUTE_SELECT ("routing.route.select");
+    KEY_ACTIVE_ROUTE_COLOR ("routing.active.route.color"),
+    KEY_INACTIVE_ROUTE_COLOR ("routing.inactive.route.color"),
+    KEY_ROUTE_WIDTH ("routing.route.width"),
+    KEY_ROUTE_SELECT ("routing.route.select");
 
-	public final String key;
-	PreferencesKeys (String key) {
-		this.key=key;
-	}
+    public final String key;
+    PreferencesKeys (String key) {
+        this.key=key;
+    }
 
-	public String getKey() {return key;};
+    public String getKey() {return key;};
 }
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingEdge.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingEdge.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingEdge.java	(revision 15707)
@@ -5,23 +5,23 @@
 public interface RoutingEdge {
 
-	  public LatLon fromLatLon();
+      public LatLon fromLatLon();
 
-	  public LatLon toLatLon();
-	  
-	  public Object fromV();
+      public LatLon toLatLon();
+      
+      public Object fromV();
 
-	  public Object toV();
+      public Object toV();
 
-	  public double getLength();
-	  
-	  public void setLength(double length);
-	  
-	  public double getSpeed();
+      public double getLength();
+      
+      public void setLength(double length);
+      
+      public double getSpeed();
 
-	  public void setSpeed(double speed);
-	  
-	  public boolean isOneway();
-	  
-	  public void setOneway(boolean isOneway);
+      public void setSpeed(double speed);
+      
+      public boolean isOneway();
+      
+      public void setOneway(boolean isOneway);
 
 }
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraph.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraph.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraph.java	(revision 15707)
@@ -52,327 +52,327 @@
 public class RoutingGraph {
 
-	/**
+    /**
      * Routing Profile
      */
     private RoutingProfile routingProfile;
 
-	/**
-	 * Diferent algorithms to apply to the graph.
-	 */
-	public enum Algorithm {
-		ROUTING_ALG_DIJKSTRA, ROUTING_ALG_BELLMANFORD
-	};
-
-	/**
-	 * Search criteria for the route.
-	 */
-	public enum RouteType {FASTEST,SHORTEST};
-
-	/**
-	 *
-	 */
-	private RouteType routeType;
+    /**
+     * Diferent algorithms to apply to the graph.
+     */
+    public enum Algorithm {
+        ROUTING_ALG_DIJKSTRA, ROUTING_ALG_BELLMANFORD
+    };
+
+    /**
+     * Search criteria for the route.
+     */
+    public enum RouteType {FASTEST,SHORTEST};
+
+    /**
+     *
+     */
+    private RouteType routeType;
 
     /**
      * Associated Osm DataSet
      */
-	private DataSet data;
-
-	/**
-	 * Logger.
-	 */
-	static Logger logger = Logger.getLogger(RoutingGraph.class);
-
-	/**
-	 * Graph state
-	 * <code>true</code> Graph in memory.
-	 * <code>false</code> Graph not created.
-	 */
-//	public boolean graphState;
-
-	/**
-	 * OSM Graph.
-	 */
-//	private DirectedWeightedMultigraph<Node, OsmEdge> graph;
-//	private WeightedMultigraph<Node, OsmEdge> graph;
-	private Graph<Node, OsmEdge> graph;
-	private RoutingGraphDelegator rgDelegator=null;
-
-	/**
-	 * Speeds
-	 */
-	private Map<String,Double> waySpeeds;
-
-	/**
-	 * Default Constructor.
-	 */
-	public RoutingGraph(DataSet data) {
-//		this.graphState = false;
-		this.graph = null;
-//		this.data = data;
-		routeType=RouteType.SHORTEST;
-		routingProfile=new RoutingProfile("default");
-		routingProfile.setOnewayUse(true); // Don't ignore oneways by default
-		this.setWaySpeeds(routingProfile.getWaySpeeds());
-		logger.debug("Created RoutingGraph");
-	}
-
-	/**
-	 * Create OSM graph for routing
-	 *
-	 * @return
-	 */
-	public void createGraph() {
-
-		logger.debug("Creating Graph...");
-		graph = new DirectedWeightedMultigraph<Node, OsmEdge>(OsmEdge.class);
-		rgDelegator=new RoutingGraphDelegator(graph);
-		rgDelegator.setRouteType(this.routeType);
-		// iterate all ways and segments for all nodes:
-		for (Way way : data.ways) {
-			if (way != null && !way.deleted && this.isvalidWay(way)) {
-				Node from = null;
-				for (Node to : way.nodes) {
-					// Ignore the node if deleted
-					if (!to.deleted) {
-						graph.addVertex(to);
-						if (from != null) {
-							addEdge(way, from, to);
-							if (!isOneWay(way)){
-								addEdge(way, to, from);}
-						}
-						from = to;
-					}
-				}
-			}
-		}
-//		graph.vertexSet().size();
-		logger.debug("End Create Graph");
-		logger.debug("Vertex: "+graph.vertexSet().size());
-		logger.debug("Edges: "+graph.edgeSet().size());
-	}
-
-	/**
-	 * Compute weight and add edge to the graph
-	 * @param way
-	 * @param from
-	 * @param to
-	 */
-	private void addEdge(Way way,Node from, Node to) {
-		double length = from.coor.greatCircleDistance(to.coor);
-		
-		OsmEdge edge = new OsmEdge(way, from, to);
-		edge.setSpeed(12.1);
-		graph.addEdge(from, to, edge);
-		// weight = getWeight(way);
-		double weight = getWeight(way, length);
-		setWeight(edge, length);
-		logger.debug("edge for way " + way.id
-				     + "(from node " + from.id + " to node "
-				     + to.id + ") has weight: " + weight);
-		//((GraphDelegator<Node,OsmEdge>) graph).setEdgeWeight(edge, weight);
-		((DirectedWeightedMultigraph<Node,OsmEdge>)graph).setEdgeWeight(edge, weight);
-	}
-
-	/**
-	 * Set the weight for the given segment depending on the highway type
-	 * and the length of the segment. The higher the value, the less it is used
-	 * in routing.
-	 *
-	 * @param way
-	 *            the way.
-	 * @return
-	 */
-	private void setWeight(OsmEdge osmedge, double length) {
-		
-		osmedge.setLength(length);
-		if (this.waySpeeds.containsKey(osmedge.getWay().get("highway")))
-			osmedge.setSpeed(this.waySpeeds.get(osmedge.getWay().get("highway")));
-					
-	}
-
-	/**
-	 * Returns the weight for the given segment depending on the highway type
-	 * and the length of the segment. The higher the value, the less it is used
-	 * in routing.
-	 *
-	 * @param way
-	 *            the way.
-	 * @return
-	 */
-	private double getWeight(Way way, double length) {
-		// Default speed if no setting is found
-		double speed = 1;
-
-		switch (routeType) {
-		case SHORTEST:
-			// Same speed for all types of ways
-			if (this.waySpeeds.containsKey("residential"))
-				speed=this.waySpeeds.get("residential");
-			break;
-		case FASTEST:
-			// Each type of way may have a different speed
-			if (this.waySpeeds.containsKey(way.get("highway")))
-				speed=this.waySpeeds.get(way.get("highway"));
-			logger.debug("Speed="+speed);
-			break;
-		default:
-			break;
-		}
-		// Return the time spent to traverse the way
-		return length / speed;
-	}
-	
-	/**
-	 * Check is One Way.
-	 *
-	 * @param way
-	 *            the way.
-	 * @return <code>true</code> is a one way. <code>false</code> is not a one
-	 *         way.
-	 */
-	private boolean isOneWay(Way way) {
-		// FIXME: oneway=-1 is ignored for the moment!
-		return way.get("oneway") != null
-				|| "motorway".equals(way.get("highway"));
-	}
-
-	/**
-	 * Check if a Way is correct.
-	 *
-	 * @param way
-	 *            The way.
-	 * @return <code>true</code> is valid. <code>false</code> is not valid.
-	 */
-	public boolean isvalidWay(Way way) {
-		if (!way.isTagged())
-			return false;
-
-		return way.get("highway") != null || way.get("junction") != null
-				|| way.get("service") != null;
-
-	}
-
-	public boolean isvalidNode(Node node) {
-		return true;
-	}
-
-	/**
-	 * Apply selected routing algorithm to the graph.
-	 *
-	 * @param nodes
-	 *            Nodes used to calculate path.
-	 * @param algorithm
-	 *            Algorithm used to compute the path,
-	 *            RoutingGraph.Algorithm.ROUTING_ALG_DIJKSTRA or
-	 *            RoutingGraph.Algorithm.ROUTING_ALG_BELLMANFORD
-	 * @return new path.
-	 */
-	public List<OsmEdge> applyAlgorithm(List<Node> nodes, Algorithm algorithm) {
-		List<OsmEdge> path = new ArrayList<OsmEdge>();
-		Graph<Node,OsmEdge> g;
-		double totalWeight = 0;
-
-		if (graph == null)
-			this.createGraph();
-		logger.debug("apply algorithm between nodes ");
-
-		for (Node node : nodes) {
-			logger.debug(node.id);
-		}
-		logger.debug("-----------------------------------");
-
-		// Assign the graph or an undirected view of the graph to g,
-		// depending on whether oneway tags are used or not
-		if (routingProfile.isOnewayUsed())
-			g = graph;
-		else
-			g = new AsUndirectedGraph<Node, OsmEdge>((DirectedWeightedMultigraph<Node,OsmEdge>)graph);
-		//TODO: Problemas no tiene encuenta el tema de oneway.
-		switch (algorithm) {
-		case ROUTING_ALG_DIJKSTRA:
-			logger.debug("Using Dijkstra algorithm");
-			DijkstraShortestPath<Node, OsmEdge> routingk = null;
-			for (int index = 1; index < nodes.size(); ++index) {
-				routingk = new DijkstraShortestPath<Node, OsmEdge>(rgDelegator, nodes
-						.get(index - 1), nodes.get(index));
-				if (routingk.getPathEdgeList() == null) {
-					logger.debug("no path found!");
-					break;
-				}
-				path.addAll(routingk.getPathEdgeList());
-				totalWeight += routingk.getPathLength();
-			}
-			break;
-		case ROUTING_ALG_BELLMANFORD:
-			logger.debug("Using Bellman Ford algorithm");
-			for (int index = 1; index < nodes.size(); ++index) {
-				path = BellmanFordShortestPath.findPathBetween(rgDelegator, nodes
-						.get(index - 1), nodes.get(index));
-				if (path == null) {
-					logger.debug("no path found!");
-					return null;
-				}
-			}
-			break;
-		default:
-			logger.debug("Wrong algorithm");
-			break;
-		}
-
-		logger.debug("shortest path found: " + path + "\nweight: "
-						+ totalWeight);
-		return path;
-	}
-
-	/**
-	 * Return the number of vertices.
-	 * @return the number of vertices.
-	 */
-	public int getVertexCount(){
-		int value=0;
-		if (graph!=null) value=graph.vertexSet().size();
-		return value;
-	}
-
-	/**
-	 * Return the number of edges.
-	 * @return the number of edges.
-	 */
-	public int getEdgeCount(){
-		int value=0;
-		if (graph!=null) value=graph.edgeSet().size();
-		return value;
-	}
-
-	/**
-	 * @param routeType the routeType to set
-	 */
-	public void setTypeRoute(RouteType routetype) {
-		this.routeType = routetype;
-		this.rgDelegator.setRouteType(routetype);
-	}
-
-	/**
-	 * @return the routeType
-	 */
-	public RouteType getTypeRoute() {
-		return routeType;
-	}
-
-	public Map<String, Double> getWaySpeeds() {
-		return waySpeeds;
-	}
-
-	public void setWaySpeeds(Map<String, Double> waySpeeds) {
-		this.waySpeeds = waySpeeds;
-	}
-
-	public void resetGraph() {
-		graph=null;
-	}
-
-	public RoutingProfile getRoutingProfile() {
-		return routingProfile;
-	}
+    private DataSet data;
+
+    /**
+     * Logger.
+     */
+    static Logger logger = Logger.getLogger(RoutingGraph.class);
+
+    /**
+     * Graph state
+     * <code>true</code> Graph in memory.
+     * <code>false</code> Graph not created.
+     */
+//  public boolean graphState;
+
+    /**
+     * OSM Graph.
+     */
+//  private DirectedWeightedMultigraph<Node, OsmEdge> graph;
+//  private WeightedMultigraph<Node, OsmEdge> graph;
+    private Graph<Node, OsmEdge> graph;
+    private RoutingGraphDelegator rgDelegator=null;
+
+    /**
+     * Speeds
+     */
+    private Map<String,Double> waySpeeds;
+
+    /**
+     * Default Constructor.
+     */
+    public RoutingGraph(DataSet data) {
+//      this.graphState = false;
+        this.graph = null;
+        this.data = data;
+        routeType=RouteType.SHORTEST;
+        routingProfile=new RoutingProfile("default");
+        routingProfile.setOnewayUse(true); // Don't ignore oneways by default
+        this.setWaySpeeds(routingProfile.getWaySpeeds());
+        logger.debug("Created RoutingGraph");
+    }
+
+    /**
+     * Create OSM graph for routing
+     *
+     * @return
+     */
+    public void createGraph() {
+
+        logger.debug("Creating Graph...");
+        graph = new DirectedWeightedMultigraph<Node, OsmEdge>(OsmEdge.class);
+        rgDelegator=new RoutingGraphDelegator(graph);
+        rgDelegator.setRouteType(this.routeType);
+        // iterate all ways and segments for all nodes:
+        for (Way way : data.ways) {
+            if (way != null && !way.deleted && this.isvalidWay(way)) {
+                Node from = null;
+                for (Node to : way.nodes) {
+                    // Ignore the node if deleted
+                    if (!to.deleted) {
+                        graph.addVertex(to);
+                        if (from != null) {
+                            addEdge(way, from, to);
+                            if (!isOneWay(way)){
+                                addEdge(way, to, from);}
+                        }
+                        from = to;
+                    }
+                }
+            }
+        }
+//      graph.vertexSet().size();
+        logger.debug("End Create Graph");
+        logger.debug("Vertex: "+graph.vertexSet().size());
+        logger.debug("Edges: "+graph.edgeSet().size());
+    }
+
+    /**
+     * Compute weight and add edge to the graph
+     * @param way
+     * @param from
+     * @param to
+     */
+    private void addEdge(Way way,Node from, Node to) {
+        double length = from.coor.greatCircleDistance(to.coor);
+
+        OsmEdge edge = new OsmEdge(way, from, to);
+        edge.setSpeed(12.1);
+        graph.addEdge(from, to, edge);
+        // weight = getWeight(way);
+        double weight = getWeight(way, length);
+        setWeight(edge, length);
+        logger.debug("edge for way " + way.id
+                     + "(from node " + from.id + " to node "
+                     + to.id + ") has weight: " + weight);
+        //((GraphDelegator<Node,OsmEdge>) graph).setEdgeWeight(edge, weight);
+        ((DirectedWeightedMultigraph<Node,OsmEdge>)graph).setEdgeWeight(edge, weight);
+    }
+
+    /**
+     * Set the weight for the given segment depending on the highway type
+     * and the length of the segment. The higher the value, the less it is used
+     * in routing.
+     *
+     * @param way
+     *            the way.
+     * @return
+     */
+    private void setWeight(OsmEdge osmedge, double length) {
+
+        osmedge.setLength(length);
+        if (this.waySpeeds.containsKey(osmedge.getWay().get("highway")))
+            osmedge.setSpeed(this.waySpeeds.get(osmedge.getWay().get("highway")));
+
+    }
+
+    /**
+     * Returns the weight for the given segment depending on the highway type
+     * and the length of the segment. The higher the value, the less it is used
+     * in routing.
+     *
+     * @param way
+     *            the way.
+     * @return
+     */
+    private double getWeight(Way way, double length) {
+        // Default speed if no setting is found
+        double speed = 1;
+
+        switch (routeType) {
+        case SHORTEST:
+            // Same speed for all types of ways
+            if (this.waySpeeds.containsKey("residential"))
+                speed=this.waySpeeds.get("residential");
+            break;
+        case FASTEST:
+            // Each type of way may have a different speed
+            if (this.waySpeeds.containsKey(way.get("highway")))
+                speed=this.waySpeeds.get(way.get("highway"));
+            logger.debug("Speed="+speed);
+            break;
+        default:
+            break;
+        }
+        // Return the time spent to traverse the way
+        return length / speed;
+    }
+
+    /**
+     * Check is One Way.
+     *
+     * @param way
+     *            the way.
+     * @return <code>true</code> is a one way. <code>false</code> is not a one
+     *         way.
+     */
+    private boolean isOneWay(Way way) {
+        // FIXME: oneway=-1 is ignored for the moment!
+        return way.get("oneway") != null
+                || "motorway".equals(way.get("highway"));
+    }
+
+    /**
+     * Check if a Way is correct.
+     *
+     * @param way
+     *            The way.
+     * @return <code>true</code> is valid. <code>false</code> is not valid.
+     */
+    public boolean isvalidWay(Way way) {
+        if (!way.isTagged())
+            return false;
+
+        return way.get("highway") != null || way.get("junction") != null
+                || way.get("service") != null;
+
+    }
+
+    public boolean isvalidNode(Node node) {
+        return true;
+    }
+
+    /**
+     * Apply selected routing algorithm to the graph.
+     *
+     * @param nodes
+     *            Nodes used to calculate path.
+     * @param algorithm
+     *            Algorithm used to compute the path,
+     *            RoutingGraph.Algorithm.ROUTING_ALG_DIJKSTRA or
+     *            RoutingGraph.Algorithm.ROUTING_ALG_BELLMANFORD
+     * @return new path.
+     */
+    public List<OsmEdge> applyAlgorithm(List<Node> nodes, Algorithm algorithm) {
+        List<OsmEdge> path = new ArrayList<OsmEdge>();
+        Graph<Node,OsmEdge> g;
+        double totalWeight = 0;
+
+        if (graph == null)
+            this.createGraph();
+        logger.debug("apply algorithm between nodes ");
+
+        for (Node node : nodes) {
+            logger.debug(node.id);
+        }
+        logger.debug("-----------------------------------");
+
+        // Assign the graph or an undirected view of the graph to g,
+        // depending on whether oneway tags are used or not
+        if (routingProfile.isOnewayUsed())
+            g = graph;
+        else
+            g = new AsUndirectedGraph<Node, OsmEdge>((DirectedWeightedMultigraph<Node,OsmEdge>)graph);
+        //TODO: Problemas no tiene encuenta el tema de oneway.
+        switch (algorithm) {
+        case ROUTING_ALG_DIJKSTRA:
+            logger.debug("Using Dijkstra algorithm");
+            DijkstraShortestPath<Node, OsmEdge> routingk = null;
+            for (int index = 1; index < nodes.size(); ++index) {
+                routingk = new DijkstraShortestPath<Node, OsmEdge>(rgDelegator, nodes
+                        .get(index - 1), nodes.get(index));
+                if (routingk.getPathEdgeList() == null) {
+                    logger.debug("no path found!");
+                    break;
+                }
+                path.addAll(routingk.getPathEdgeList());
+                totalWeight += routingk.getPathLength();
+            }
+            break;
+        case ROUTING_ALG_BELLMANFORD:
+            logger.debug("Using Bellman Ford algorithm");
+            for (int index = 1; index < nodes.size(); ++index) {
+                path = BellmanFordShortestPath.findPathBetween(rgDelegator, nodes
+                        .get(index - 1), nodes.get(index));
+                if (path == null) {
+                    logger.debug("no path found!");
+                    return null;
+                }
+            }
+            break;
+        default:
+            logger.debug("Wrong algorithm");
+            break;
+        }
+
+        logger.debug("shortest path found: " + path + "\nweight: "
+                        + totalWeight);
+        return path;
+    }
+
+    /**
+     * Return the number of vertices.
+     * @return the number of vertices.
+     */
+    public int getVertexCount(){
+        int value=0;
+        if (graph!=null) value=graph.vertexSet().size();
+        return value;
+    }
+
+    /**
+     * Return the number of edges.
+     * @return the number of edges.
+     */
+    public int getEdgeCount(){
+        int value=0;
+        if (graph!=null) value=graph.edgeSet().size();
+        return value;
+    }
+
+    /**
+     * @param routeType the routeType to set
+     */
+    public void setTypeRoute(RouteType routetype) {
+        this.routeType = routetype;
+        this.rgDelegator.setRouteType(routetype);
+    }
+
+    /**
+     * @return the routeType
+     */
+    public RouteType getTypeRoute() {
+        return routeType;
+    }
+
+    public Map<String, Double> getWaySpeeds() {
+        return waySpeeds;
+    }
+
+    public void setWaySpeeds(Map<String, Double> waySpeeds) {
+        this.waySpeeds = waySpeeds;
+    }
+
+    public void resetGraph() {
+        graph=null;
+    }
+
+    public RoutingProfile getRoutingProfile() {
+        return routingProfile;
+    }
 }
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraphDelegator.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraphDelegator.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingGraphDelegator.java	(revision 15707)
@@ -19,42 +19,42 @@
 public class RoutingGraphDelegator extends GraphDelegator<Node, OsmEdge> {
 
-	/**
-	 * Logger.
-	 */
-	static Logger logger = Logger.getLogger(RoutingGraphDelegator.class);
-	
-	/**
-	 *
-	 */
-	private RouteType routeType;
-	
-	public RoutingGraphDelegator(Graph<Node, OsmEdge> arg0) {
-		super(arg0);
-	}
-	
+    /**
+     * Logger.
+     */
+    static Logger logger = Logger.getLogger(RoutingGraphDelegator.class);
+    
+    /**
+     *
+     */
+    private RouteType routeType;
+    
+    public RoutingGraphDelegator(Graph<Node, OsmEdge> arg0) {
+        super(arg0);
+    }
+    
 
-	public RouteType getRouteType() {
-		return routeType;
-	}
+    public RouteType getRouteType() {
+        return routeType;
+    }
 
-	public void setRouteType(RouteType routeType) {
-		this.routeType = routeType;
-	}
+    public void setRouteType(RouteType routeType) {
+        this.routeType = routeType;
+    }
 
 
-	/**
-	 * 
-	 */
-	private static final long serialVersionUID = 1L;
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
 
-	@Override
-	public double getEdgeWeight(OsmEdge edge) {
-		double weight=Double.MAX_VALUE;
-		
-		if (routeType==RouteType.SHORTEST) weight=edge.getLength();
-		if (routeType==RouteType.FASTEST) weight=edge.getLength() / edge.getSpeed();
-		// Return the time spent to traverse the way
-		return weight;
-	}
+    @Override
+    public double getEdgeWeight(OsmEdge edge) {
+        double weight=Double.MAX_VALUE;
+        
+        if (routeType==RouteType.SHORTEST) weight=edge.getLength();
+        if (routeType==RouteType.FASTEST) weight=edge.getLength() / edge.getSpeed();
+        // Return the time spent to traverse the way
+        return weight;
+    }
 
 }
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingProfile.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingProfile.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/core/RoutingProfile.java	(revision 15707)
@@ -29,133 +29,133 @@
  */
 public class RoutingProfile {
-	/**
-	 * logger
-	 */
-	static Logger logger = Logger.getLogger(RoutingProfile.class);
-	/**
-	 * True if oneway is used for routing (i.e. for cars).
-	 */
-	private boolean useOneway;
+    /**
+     * logger
+     */
+    static Logger logger = Logger.getLogger(RoutingProfile.class);
+    /**
+     * True if oneway is used for routing (i.e. for cars).
+     */
+    private boolean useOneway;
 
-	/**
-	 * True if turn restrictions are used for routing (i.e. for cars).
-	 */
-	private boolean useRestrictions;
+    /**
+     * True if turn restrictions are used for routing (i.e. for cars).
+     */
+    private boolean useRestrictions;
 
-	/**
-	 * True if maximum allowed speed of ways is considered for routing (i.e. for cars).
-	 */
-	private boolean useMaxAllowedSpeed;
+    /**
+     * True if maximum allowed speed of ways is considered for routing (i.e. for cars).
+     */
+    private boolean useMaxAllowedSpeed;
 
-	/**
-	 * Name of the routing profile, for identification issues (i.e. "pedestrian").
-	 */
-	private String name;
+    /**
+     * Name of the routing profile, for identification issues (i.e. "pedestrian").
+     */
+    private String name;
 
-	/**
-	 * Holds traverse speed for each type of way, using the type as key.
-	 * A speed of zero means that this type of way cannot be traversed.
-	 */
-	private Map<String,Double> waySpeeds;
+    /**
+     * Holds traverse speed for each type of way, using the type as key.
+     * A speed of zero means that this type of way cannot be traversed.
+     */
+    private Map<String,Double> waySpeeds;
 
 
 
-	/**
-	 * Holds permission of use for each type of transport mode, using the mode as key.
-	 */
-	private Map<String,Boolean> allowedModes;
+    /**
+     * Holds permission of use for each type of transport mode, using the mode as key.
+     */
+    private Map<String,Boolean> allowedModes;
 
-	/**
-	 * Constructor
-	 * @param name The name for the routing profile. Please use a name that is
-	 * self descriptive, i.e., something that an application user would
-	 * understand (like "pedestrian", "motorbike", "bicycle", etc.)
-	 */
-	public RoutingProfile(String name) {
-		logger.debug("Init RoutingProfile with name: "+name);
-		this.name = name;
-		waySpeeds=new HashMap<String,Double>();
-		Map<String,String> prefs=Main.pref.getAllPrefix("routing.profile."+name+".speed");
-		for(String key:prefs.keySet()){
-			waySpeeds.put((key.split("\\.")[4]), Double.valueOf(prefs.get(key)));
-		}
-		for (String key:waySpeeds.keySet())
-			logger.debug(key+ "-- speed: "+waySpeeds.get(key));
-		logger.debug("End init RoutingProfile with name: "+name);
-	}
+    /**
+     * Constructor
+     * @param name The name for the routing profile. Please use a name that is
+     * self descriptive, i.e., something that an application user would
+     * understand (like "pedestrian", "motorbike", "bicycle", etc.)
+     */
+    public RoutingProfile(String name) {
+        logger.debug("Init RoutingProfile with name: "+name);
+        this.name = name;
+        waySpeeds=new HashMap<String,Double>();
+        Map<String,String> prefs=Main.pref.getAllPrefix("routing.profile."+name+".speed");
+        for(String key:prefs.keySet()){
+            waySpeeds.put((key.split("\\.")[4]), Double.valueOf(prefs.get(key)));
+        }
+        for (String key:waySpeeds.keySet())
+            logger.debug(key+ "-- speed: "+waySpeeds.get(key));
+        logger.debug("End init RoutingProfile with name: "+name);
+    }
 
-	public void setName(String name) {
-		this.name = name;
-	}
+    public void setName(String name) {
+        this.name = name;
+    }
 
-	public String getName() {
-		return name;
-	}
+    public String getName() {
+        return name;
+    }
 
-	public void setOnewayUse(boolean useOneway) {
-		this.useOneway = useOneway;
-	}
+    public void setOnewayUse(boolean useOneway) {
+        this.useOneway = useOneway;
+    }
 
-	public boolean isOnewayUsed() {
-		return useOneway;
-	}
+    public boolean isOnewayUsed() {
+        return useOneway;
+    }
 
-	public void setRestrictionsUse(boolean useRestrictions) {
-		this.useRestrictions = useRestrictions;
-	}
+    public void setRestrictionsUse(boolean useRestrictions) {
+        this.useRestrictions = useRestrictions;
+    }
 
-	public boolean isRestrictionsUsed() {
-		return useRestrictions;
-	}
+    public boolean isRestrictionsUsed() {
+        return useRestrictions;
+    }
 
-	public void setMaxAllowedSpeedUse(boolean useMaxAllowedSpeed) {
-		this.useMaxAllowedSpeed = useMaxAllowedSpeed;
-	}
+    public void setMaxAllowedSpeedUse(boolean useMaxAllowedSpeed) {
+        this.useMaxAllowedSpeed = useMaxAllowedSpeed;
+    }
 
-	public boolean isMaxAllowedSpeedUsed() {
-		return useMaxAllowedSpeed;
-	}
+    public boolean isMaxAllowedSpeedUsed() {
+        return useMaxAllowedSpeed;
+    }
 
-	public void setWayTypeSpeed(String type, double speed) {
-		waySpeeds.put(type, speed);
-	}
+    public void setWayTypeSpeed(String type, double speed) {
+        waySpeeds.put(type, speed);
+    }
 
-	public void setTransportModePermission(String mode, boolean permission) {
-		allowedModes.put(mode, permission);
-	}
+    public void setTransportModePermission(String mode, boolean permission) {
+        allowedModes.put(mode, permission);
+    }
 
-	/**
-	 * Return whether the driving profile specifies that a particular type of way
-	 * can be traversed
-	 * @param type Key for the way type
-	 * @return True if the way type can be traversed
-	 */
-	public boolean isWayTypeAllowed(String type) {
-		if (waySpeeds.get(type) != 0.0)
-			return true;
-		return false;
-	}
+    /**
+     * Return whether the driving profile specifies that a particular type of way
+     * can be traversed
+     * @param type Key for the way type
+     * @return True if the way type can be traversed
+     */
+    public boolean isWayTypeAllowed(String type) {
+        if (waySpeeds.get(type) != 0.0)
+            return true;
+        return false;
+    }
 
-	/**
-	 * Return whether the driving profile specifies that a particular type of transport
-	 * mode can be used
-	 * @param mode Key for the way type
-	 * @return True if the way type can be traversed
-	 */
-	public boolean isTransportModeAllowed(String mode) {
-		return allowedModes.get(mode);
-	}
+    /**
+     * Return whether the driving profile specifies that a particular type of transport
+     * mode can be used
+     * @param mode Key for the way type
+     * @return True if the way type can be traversed
+     */
+    public boolean isTransportModeAllowed(String mode) {
+        return allowedModes.get(mode);
+    }
 
-	public double getSpeed(String key){
-		if(!waySpeeds.containsKey(key)) return 0.0;
-		return waySpeeds.get(key);
-	}
+    public double getSpeed(String key){
+        if(!waySpeeds.containsKey(key)) return 0.0;
+        return waySpeeds.get(key);
+    }
 
-	public Map<String, Double> getWaySpeeds() {
-		return waySpeeds;
-	}
+    public Map<String, Double> getWaySpeeds() {
+        return waySpeeds;
+    }
 
-	public void setWaySpeeds(Map<String, Double> waySpeeds) {
-		this.waySpeeds = waySpeeds;
-	}
+    public void setWaySpeeds(Map<String, Double> waySpeeds) {
+        this.waySpeeds = waySpeeds;
+    }
 }
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/gtfs/GTFSTransportModes.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/gtfs/GTFSTransportModes.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/gtfs/GTFSTransportModes.java	(revision 15707)
@@ -9,49 +9,49 @@
 public class GTFSTransportModes {
 
-	/**
-	 * 0 - Tram, Streetcar, Light rail. Any light rail or street level system within
-	 *     a metropolitan area.
-	 */
-	public static final int TRAM = 0;
-	public static final int STREETCAR = 0;
-	public static final int LIGHT_RAIL = 0;
+    /**
+     * 0 - Tram, Streetcar, Light rail. Any light rail or street level system within
+     *     a metropolitan area.
+     */
+    public static final int TRAM = 0;
+    public static final int STREETCAR = 0;
+    public static final int LIGHT_RAIL = 0;
 
-	/**
-	 * 1 - Subway, Metro. Any underground rail system within a metropolitan area.
-	 */
-	public static final int SUBWAY = 1;
-	public static final int METRO = 1;
+    /**
+     * 1 - Subway, Metro. Any underground rail system within a metropolitan area.
+     */
+    public static final int SUBWAY = 1;
+    public static final int METRO = 1;
 
     /**
      * 2 - Rail. Used for intercity or long-distance travel.
      */
-	public static final int RAIL = 2;
+    public static final int RAIL = 2;
 
     /**
      * 3 - Bus. Used for short- and long-distance bus routes.
      */
-	public static final int BUS = 3;
+    public static final int BUS = 3;
 
     /**
      * 4 - Ferry. Used for short- and long-distance boat service.
      */
-	public static final int FERRY = 4;
+    public static final int FERRY = 4;
 
-	/**
-	 * 5 - Cable car. Used for street-level cable cars where the cable runs beneath the car.
-	 */
-	public static final int CABLE_CAR = 5;
+    /**
+     * 5 - Cable car. Used for street-level cable cars where the cable runs beneath the car.
+     */
+    public static final int CABLE_CAR = 5;
 
-	/**
-	 * 6 - Gondola, Suspended cable car. Typically used for aerial cable cars where
-	 *     the car is suspended from the cable.
-	 */
-	public static final int GONDOLA = 6;
-	public static final int SUSPENDED_CABLE_CAR = 6;
+    /**
+     * 6 - Gondola, Suspended cable car. Typically used for aerial cable cars where
+     *     the car is suspended from the cable.
+     */
+    public static final int GONDOLA = 6;
+    public static final int SUSPENDED_CABLE_CAR = 6;
 
     /**
      * 7 - Funicular. Any rail system designed for steep inclines.
      */
-	public static final int FUNICULAR = 7;
+    public static final int FUNICULAR = 7;
 
 }
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/osm/OsmEdge.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/osm/OsmEdge.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/osm/OsmEdge.java	(revision 15707)
@@ -65,10 +65,10 @@
    */
   public OsmEdge(Way way, Node from, Node to) {
-	  	super();
-	  	this.way = way;
-	  	this.from = from;
-	  	this.to = to;
-	  	this.length = from.coor.greatCircleDistance(to.coor);
-	  }
+        super();
+        this.way = way;
+        this.from = from;
+        this.to = to;
+        this.length = from.coor.greatCircleDistance(to.coor);
+      }
 
   /**
@@ -92,17 +92,17 @@
    */
   public double getLength() {
-  	return length;
+    return length;
   }
   
   public void setLength(double length) {
-	this.length = length;
+    this.length = length;
 }
 
 public double getSpeed() {
-		return speed;
+        return speed;
   }
 
   public void setSpeed(double speed) {
-		this.speed = speed;
+        this.speed = speed;
   }
 }
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/osm/OsmWayTypes.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/osm/OsmWayTypes.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/jrt/osm/OsmWayTypes.java	(revision 15707)
@@ -34,46 +34,46 @@
  */
 public enum OsmWayTypes {
-	MOTORWAY ("motorway",120),
-	MOTORWAY_LINK ("motorway_link",120),
-	TRUNK ("trunk",120),
-	TRUNK_LINK ("trunk_link",120),
-	PRIMARY  ("primary",100),
-	PRIMARY_LINK ("primary_link",100),
-	SECONDARY ("secondary",90),
-	TERTIARY ("tertiary",90),
-	UNCLASSIFIED ("unclassified",50),
-	ROAD ("road",100),
+    MOTORWAY ("motorway",120),
+    MOTORWAY_LINK ("motorway_link",120),
+    TRUNK ("trunk",120),
+    TRUNK_LINK ("trunk_link",120),
+    PRIMARY  ("primary",100),
+    PRIMARY_LINK ("primary_link",100),
+    SECONDARY ("secondary",90),
+    TERTIARY ("tertiary",90),
+    UNCLASSIFIED ("unclassified",50),
+    ROAD ("road",100),
     RESIDENTIAL ("residential",50),
-	LIVING_STREET ("living_street",30),
-	SERVICE ("service",30),
-	TRACK ("track",50),
-	PEDESTRIAN ("pedestrian",30),
-	BUS_GUIDEWAY ("bus_guideway",50),
-	PATH ("path",40),
-	CYCLEWAY ("cycleway",40),
-	FOOTWAY ("footway",20),
-	BRIDLEWAY ("bridleway",40),
-	BYWAY ("byway",50),
-	STEPS ("steps",10);
+    LIVING_STREET ("living_street",30),
+    SERVICE ("service",30),
+    TRACK ("track",50),
+    PEDESTRIAN ("pedestrian",30),
+    BUS_GUIDEWAY ("bus_guideway",50),
+    PATH ("path",40),
+    CYCLEWAY ("cycleway",40),
+    FOOTWAY ("footway",20),
+    BRIDLEWAY ("bridleway",40),
+    BYWAY ("byway",50),
+    STEPS ("steps",10);
 
-	/**
-	 * Default Constructor
-	 * @param tag
-	 */
-	OsmWayTypes(String tag,int speed) {
-		this.tag = tag;
-		this.speed = speed;
-	}
+    /**
+     * Default Constructor
+     * @param tag
+     */
+    OsmWayTypes(String tag,int speed) {
+        this.tag = tag;
+        this.speed = speed;
+    }
 
-	/**
-	 * Tag
-	 */
-	private final String tag;
-	private final int speed;
+    /**
+     * Tag
+     */
+    private final String tag;
+    private final int speed;
 
-	/**
-	 * @return
-	 */
-	public String getTag() {return tag;};
-	public int getSpeed() {return speed;};
+    /**
+     * @return
+     */
+    public String getTag() {return tag;};
+    public int getSpeed() {return speed;};
 }
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingLayer.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingLayer.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingLayer.java	(revision 15707)
@@ -70,8 +70,8 @@
 public class RoutingLayer extends Layer {
 
-	/**
-	 * Logger
-	 */
-	static Logger logger = Logger.getLogger(RoutingLayer.class);
+    /**
+     * Logger
+     */
+    static Logger logger = Logger.getLogger(RoutingLayer.class);
 
     /**
@@ -99,7 +99,7 @@
      * @param name Layer name.
      */
-	public RoutingLayer(String name, OsmDataLayer dataLayer) {
-		super(name);
-		logger.debug("Creating Routing Layer...");
+    public RoutingLayer(String name, OsmDataLayer dataLayer) {
+        super(name);
+        logger.debug("Creating Routing Layer...");
         if(startIcon == null) startIcon = ImageProvider.get("routing", "startflag");
         if(middleIcon == null) middleIcon = ImageProvider.get("routing", "middleflag");
@@ -108,30 +108,30 @@
         this.routingModel = new RoutingModel(dataLayer.data);
         logger.debug("Routing Layer created.");
-	}
-
-	/**
-	 * Getter Routing Model.
-	 * @return the routingModel
-	 */
-	public RoutingModel getRoutingModel() {
-		return this.routingModel;
-	}
-
-	/**
-	 * Gets associated data layer
-	 * @return OsmDataLayer associated to the RoutingLayer
-	 */
-	public OsmDataLayer getDataLayer() {
-		return dataLayer;
-	}
-
-	/**
-	 * Gets nearest node belonging to a highway tagged way
-	 * @param p Point on the screen
-	 * @return The nearest highway node, in the range of the snap distance
-	 */
+    }
+
+    /**
+     * Getter Routing Model.
+     * @return the routingModel
+     */
+    public RoutingModel getRoutingModel() {
+        return this.routingModel;
+    }
+
+    /**
+     * Gets associated data layer
+     * @return OsmDataLayer associated to the RoutingLayer
+     */
+    public OsmDataLayer getDataLayer() {
+        return dataLayer;
+    }
+
+    /**
+     * Gets nearest node belonging to a highway tagged way
+     * @param p Point on the screen
+     * @return The nearest highway node, in the range of the snap distance
+     */
     public final Node getNearestHighwayNode(Point p) {
-    	Node nearest = null;
-    	double minDist = 0;
+        Node nearest = null;
+        double minDist = 0;
         for (Way w : dataLayer.data.ways) {
             if (w.deleted || w.incomplete || w.get("highway")==null) continue;
@@ -142,8 +142,8 @@
                 double dist = p.distanceSq(P);
                 if (dist < NavigatableComponent.snapDistance) {
-                	if ((nearest == null) || (dist < minDist)) {
-                		nearest = n;
-                		minDist = dist;
-                	}
+                    if ((nearest == null) || (dist < minDist)) {
+                        nearest = n;
+                        minDist = dist;
+                    }
                 }
             }
@@ -152,35 +152,35 @@
     }
 
-	/*
-	 * (non-Javadoc)
-	 * @see org.openstreetmap.josm.gui.layer.Layer#getIcon()
-	 */
-	@Override
-	public Icon getIcon() {
+    /*
+     * (non-Javadoc)
+     * @see org.openstreetmap.josm.gui.layer.Layer#getIcon()
+     */
+    @Override
+    public Icon getIcon() {
         Icon icon = ImageProvider.get("layer", "routing_small");
         return icon;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.openstreetmap.josm.gui.layer.Layer#getInfoComponent()
-	 */
-	@Override
-	public Object getInfoComponent() {
-		String info = "<html>"
-						+ "<body>"
-							+"Graph Vertex: "+this.routingModel.routingGraph.getVertexCount()+"<br/>"
-							+"Graph Edges: "+this.routingModel.routingGraph.getEdgeCount()+"<br/>"
-						+ "</body>"
-					+ "</html>";
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.openstreetmap.josm.gui.layer.Layer#getInfoComponent()
+     */
+    @Override
+    public Object getInfoComponent() {
+        String info = "<html>"
+                        + "<body>"
+                            +"Graph Vertex: "+this.routingModel.routingGraph.getVertexCount()+"<br/>"
+                            +"Graph Edges: "+this.routingModel.routingGraph.getEdgeCount()+"<br/>"
+                        + "</body>"
+                    + "</html>";
         return info;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.openstreetmap.josm.gui.layer.Layer#getMenuEntries()
-	 */
-	@Override
-	public Component[] getMenuEntries() {
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.openstreetmap.josm.gui.layer.Layer#getMenuEntries()
+     */
+    @Override
+    public Component[] getMenuEntries() {
         Collection<Component> components = new ArrayList<Component>();
         components.add(new JMenuItem(new LayerListDialog.ShowHideLayerAction(this)));
@@ -188,50 +188,50 @@
         components.add(new JMenuItem(new LayerListDialog.DeleteLayerAction(this)));
         components.add(new JSeparator());
-        components.add(new JMenuItem(new RenameLayerAction(associatedFile, this)));
+        components.add(new JMenuItem(new RenameLayerAction(getAssociatedFile(), this)));
         components.add(new JSeparator());
         components.add(new JMenuItem(new LayerListPopup.InfoAction(this)));
         return components.toArray(new Component[0]);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.openstreetmap.josm.gui.layer.Layer#getToolTipText()
-	 */
-	@Override
-	public String getToolTipText() {
-		String tooltip = this.routingModel.routingGraph.getVertexCount() + " vertices, "
-				+ this.routingModel.routingGraph.getEdgeCount() + " edges";
-		return tooltip;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.openstreetmap.josm.gui.layer.Layer#isMergable(org.openstreetmap.josm.gui.layer.Layer)
-	 */
-	@Override
-	public boolean isMergable(Layer other) {
-		return false;
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.openstreetmap.josm.gui.layer.Layer#mergeFrom(org.openstreetmap.josm.gui.layer.Layer)
-	 */
-	@Override
-	public void mergeFrom(Layer from) {
-		// This layer is not mergable, so do nothing
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.openstreetmap.josm.gui.layer.Layer#paint(java.awt.Graphics, org.openstreetmap.josm.gui.MapView)
-	 */
-	@Override
-	public void paint(Graphics g, MapView mv) {
-		boolean isActiveLayer = (mv.getActiveLayer().equals(this));
-		// Get routing nodes (start, middle, end)
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.openstreetmap.josm.gui.layer.Layer#getToolTipText()
+     */
+    @Override
+    public String getToolTipText() {
+        String tooltip = this.routingModel.routingGraph.getVertexCount() + " vertices, "
+                + this.routingModel.routingGraph.getEdgeCount() + " edges";
+        return tooltip;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.openstreetmap.josm.gui.layer.Layer#isMergable(org.openstreetmap.josm.gui.layer.Layer)
+     */
+    @Override
+    public boolean isMergable(Layer other) {
+        return false;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.openstreetmap.josm.gui.layer.Layer#mergeFrom(org.openstreetmap.josm.gui.layer.Layer)
+     */
+    @Override
+    public void mergeFrom(Layer from) {
+        // This layer is not mergable, so do nothing
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.openstreetmap.josm.gui.layer.Layer#paint(java.awt.Graphics, org.openstreetmap.josm.gui.MapView)
+     */
+    @Override
+    public void paint(Graphics g, MapView mv) {
+        boolean isActiveLayer = (mv.getActiveLayer().equals(this));
+        // Get routing nodes (start, middle, end)
         List<Node> nodes = routingModel.getSelectedNodes();
         if(nodes == null || nodes.size() == 0) {
-        	logger.debug("no nodes selected");
+            logger.debug("no nodes selected");
             return;
         }
@@ -241,17 +241,17 @@
         String colorString;
         if (isActiveLayer) {
-        	if (Main.pref.hasKey(PreferencesKeys.KEY_ACTIVE_ROUTE_COLOR.key))
-        			colorString = Main.pref.get(PreferencesKeys.KEY_ACTIVE_ROUTE_COLOR.key);
-        	else {
-        		colorString = ColorHelper.color2html(Color.RED);
-        		Main.pref.put(PreferencesKeys.KEY_ACTIVE_ROUTE_COLOR.key, colorString);
-        	}
+            if (Main.pref.hasKey(PreferencesKeys.KEY_ACTIVE_ROUTE_COLOR.key))
+                    colorString = Main.pref.get(PreferencesKeys.KEY_ACTIVE_ROUTE_COLOR.key);
+            else {
+                colorString = ColorHelper.color2html(Color.RED);
+                Main.pref.put(PreferencesKeys.KEY_ACTIVE_ROUTE_COLOR.key, colorString);
+            }
         } else {
-        	if (Main.pref.hasKey(PreferencesKeys.KEY_INACTIVE_ROUTE_COLOR.key))
-        		colorString = Main.pref.get(PreferencesKeys.KEY_INACTIVE_ROUTE_COLOR.key);
-        	else {
-        		colorString = ColorHelper.color2html(Color.decode("#dd2222"));
-        		Main.pref.put(PreferencesKeys.KEY_INACTIVE_ROUTE_COLOR.key, colorString);
-        	}
+            if (Main.pref.hasKey(PreferencesKeys.KEY_INACTIVE_ROUTE_COLOR.key))
+                colorString = Main.pref.get(PreferencesKeys.KEY_INACTIVE_ROUTE_COLOR.key);
+            else {
+                colorString = ColorHelper.color2html(Color.decode("#dd2222"));
+                Main.pref.put(PreferencesKeys.KEY_INACTIVE_ROUTE_COLOR.key, colorString);
+            }
         }
         Color color = ColorHelper.html2color(colorString);
@@ -277,5 +277,5 @@
         Point screen = mv.getPoint(node.eastNorth);
         startIcon.paintIcon(mv, g, screen.x - startIcon.getIconWidth()/2,
-        		screen.y - startIcon.getIconHeight());
+                screen.y - startIcon.getIconHeight());
 
         // paint middle icons
@@ -284,5 +284,5 @@
             screen = mv.getPoint(node.eastNorth);
             middleIcon.paintIcon(mv, g, screen.x - startIcon.getIconWidth()/2,
-            		screen.y - middleIcon.getIconHeight());
+                    screen.y - middleIcon.getIconHeight());
         }
         // paint end icon
@@ -291,28 +291,28 @@
             screen = mv.getPoint(node.eastNorth);
             endIcon.paintIcon(mv, g, screen.x - startIcon.getIconWidth()/2,
-            		screen.y - endIcon.getIconHeight());
-        }
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.openstreetmap.josm.gui.layer.Layer#visitBoundingBox(org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor)
-	 */
-	@Override
-	public void visitBoundingBox(BoundingXYVisitor v) {
+                    screen.y - endIcon.getIconHeight());
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.openstreetmap.josm.gui.layer.Layer#visitBoundingBox(org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor)
+     */
+    @Override
+    public void visitBoundingBox(BoundingXYVisitor v) {
         for (Node node : routingModel.getSelectedNodes()) {
             v.visit(node);
         }
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.openstreetmap.josm.gui.layer.Layer#destroy()
-	 */
-	@Override
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.openstreetmap.josm.gui.layer.Layer#destroy()
+     */
+    @Override
     public void destroy() {
-		routingModel.reset();
-//		layerAdded = false;
-	}
+        routingModel.reset();
+//      layerAdded = false;
+    }
 
     /**
@@ -320,5 +320,5 @@
      */
     private void drawEdge(Graphics g, MapView mv, OsmEdge edge, Color col, int width,
-    		boolean showDirection) {
+            boolean showDirection) {
         g.setColor(col);
         Point from;
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingModel.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingModel.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingModel.java	(revision 15707)
@@ -48,13 +48,13 @@
 public class RoutingModel {
 
-	/**
-	 * Logger
-	 */
-	static Logger logger = Logger.getLogger(RoutingModel.class);
+    /**
+     * Logger
+     */
+    static Logger logger = Logger.getLogger(RoutingModel.class);
 
     /**
      * Graph to calculate route
      */
-	public RoutingGraph routingGraph=null;
+    public RoutingGraph routingGraph=null;
 
     /**
@@ -71,8 +71,9 @@
      * Default Constructor.
      */
-	public RoutingModel(DataSet data) {
+    public RoutingModel(DataSet data) {
         nodes = new ArrayList<Node>();
+System.out.println("gr " + data);
         routingGraph = new RoutingGraph(data);
-	}
+    }
 
     /**
@@ -98,8 +99,8 @@
      */
     public void removeNode(int index) {
-    	if (nodes.size()>index)	{
-    		nodes.remove(index);
-    		this.changeNodes=true;
-    	}
+        if (nodes.size()>index) {
+            nodes.remove(index);
+            this.changeNodes=true;
+        }
     }
 
@@ -110,8 +111,8 @@
      */
     public void insertNode(int index, Node node) {
-    	if (nodes.size()>=index) {
-    		nodes.add(index, node);
-    		this.changeNodes=true;
-    	}
+        if (nodes.size()>=index) {
+            nodes.add(index, node);
+            this.changeNodes=true;
+        }
     }
 
@@ -120,10 +121,10 @@
      */
     public void reverseNodes() {
-    	List<Node> aux = new ArrayList<Node>();
-    	for (Node n : nodes) {
-    		aux.add(0,n);
-    	}
-    	nodes = aux;
-    	this.changeNodes=true;
+        List<Node> aux = new ArrayList<Node>();
+        for (Node n : nodes) {
+            aux.add(0,n);
+        }
+        nodes = aux;
+        this.changeNodes=true;
     }
 
@@ -133,10 +134,10 @@
      */
     public List<OsmEdge> getRouteEdges() {
-    	if (this.changeNodes || path==null)
-    	{
-    		path=this.routingGraph.applyAlgorithm(nodes, Algorithm.ROUTING_ALG_DIJKSTRA);
-    		this.changeNodes=false;
-    	}
-    	return path;
+        if (this.changeNodes || path==null)
+        {
+            path=this.routingGraph.applyAlgorithm(nodes, Algorithm.ROUTING_ALG_DIJKSTRA);
+            this.changeNodes=false;
+        }
+        return path;
     }
 
@@ -145,5 +146,5 @@
      */
     public void setNodesChanged() {
-    	this.changeNodes = true;
+        this.changeNodes = true;
     }
 
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingPlugin.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingPlugin.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/RoutingPlugin.java	(revision 15707)
@@ -26,7 +26,7 @@
  */
 
-
 package com.innovant.josm.plugin.routing;
 
+import static org.openstreetmap.josm.tools.I18n.marktr;
 import static org.openstreetmap.josm.tools.I18n.tr;
 
@@ -60,8 +60,8 @@
  */
 public class RoutingPlugin extends Plugin implements LayerChangeListener {
-	/**
-	 * Logger
-	 */
-	static Logger logger = Logger.getLogger(RoutingPlugin.class);
+    /**
+     * Logger
+     */
+    static Logger logger = Logger.getLogger(RoutingPlugin.class);
 
     /**
@@ -126,60 +126,59 @@
      * Default Constructor
      */
-	public RoutingPlugin() {
-		super();
-		plugin = this; // Assign reference to the plugin class
-		DOMConfigurator.configure("log4j.xml");
-		logger.debug("Loading routing plugin...");
-		preferenceSettings=new RoutingPreferenceDialog();
-		// Create side dialog
-		routingDialog = new RoutingDialog();
-		// Initialize layers list
-		layers = new ArrayList<RoutingLayer>();
+    public RoutingPlugin() {
+        super();
+        plugin = this; // Assign reference to the plugin class
+        DOMConfigurator.configure("log4j.xml");
+        logger.debug("Loading routing plugin...");
+        preferenceSettings=new RoutingPreferenceDialog();
+        // Create side dialog
+        routingDialog = new RoutingDialog();
+        // Initialize layers list
+        layers = new ArrayList<RoutingLayer>();
         // Add menu
-        menu = new RoutingMenu(tr("Routing"));
-        Main.main.menu.add(menu);
+        menu = new RoutingMenu(marktr("Routing"));
         // Register this class as LayerChangeListener
         Layer.listeners.add(this);
         logger.debug("Finished loading plugin");
-	}
-
-	/**
-	 * Provides static access to the plugin instance, to enable access to the plugin methods
-	 * @return the instance of the plugin
-	 */
-	public static RoutingPlugin getInstance() {
-		return plugin;
-	}
-
-	/**
-	 * Get the routing side dialog
-	 * @return The instance of the routing side dialog
-	 */
-	public RoutingDialog getRoutingDialog() {
-		return routingDialog;
-	}
-
-	public void addLayer() {
-		OsmDataLayer osmLayer = Main.main.editLayer();
-		RoutingLayer layer = new RoutingLayer(tr("Routing") + " [" + osmLayer.name + "]", osmLayer);
-		layers.add(layer);
-		Main.main.addLayer(layer);
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.openstreetmap.josm.plugins.Plugin#mapFrameInitialized(org.openstreetmap.josm.gui.MapFrame, org.openstreetmap.josm.gui.MapFrame)
-	 */
+    }
+
+    /**
+     * Provides static access to the plugin instance, to enable access to the plugin methods
+     * @return the instance of the plugin
+     */
+    public static RoutingPlugin getInstance() {
+        return plugin;
+    }
+
+    /**
+     * Get the routing side dialog
+     * @return The instance of the routing side dialog
+     */
+    public RoutingDialog getRoutingDialog() {
+        return routingDialog;
+    }
+
+    public void addLayer() {
+        OsmDataLayer osmLayer = Main.main.editLayer();
+        RoutingLayer layer = new RoutingLayer(tr("Routing") + " [" + osmLayer.name + "]", osmLayer);
+        layers.add(layer);
+        Main.main.addLayer(layer);
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.openstreetmap.josm.plugins.Plugin#mapFrameInitialized(org.openstreetmap.josm.gui.MapFrame, org.openstreetmap.josm.gui.MapFrame)
+     */
     @Override
     public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
         if(newFrame != null) {
-        	// Create plugin map modes
-        	addRouteNodeAction = new AddRouteNodeAction(newFrame);
-        	removeRouteNodeAction = new RemoveRouteNodeAction(newFrame);
-        	moveRouteNodeAction = new MoveRouteNodeAction(newFrame);
-        	// Create plugin buttons and add them to the toolbar
-        	addRouteNodeButton = new IconToggleButton(addRouteNodeAction);
-        	removeRouteNodeButton = new IconToggleButton(removeRouteNodeAction);
-        	moveRouteNodeButton = new IconToggleButton(moveRouteNodeAction);
+            // Create plugin map modes
+            addRouteNodeAction = new AddRouteNodeAction(newFrame);
+            removeRouteNodeAction = new RemoveRouteNodeAction(newFrame);
+            moveRouteNodeAction = new MoveRouteNodeAction(newFrame);
+            // Create plugin buttons and add them to the toolbar
+            addRouteNodeButton = new IconToggleButton(addRouteNodeAction);
+            removeRouteNodeButton = new IconToggleButton(removeRouteNodeAction);
+            moveRouteNodeButton = new IconToggleButton(moveRouteNodeAction);
             newFrame.addMapMode(addRouteNodeButton);
             newFrame.addMapMode(removeRouteNodeButton);
@@ -189,9 +188,9 @@
             newFrame.toolGroup.add(moveRouteNodeButton);
             // Hide them by default
-			addRouteNodeButton.setVisible(false);
-			removeRouteNodeButton.setVisible(false);
-			moveRouteNodeButton.setVisible(false);
-			// Enable menu
-			menu.enableStartItem();
+            addRouteNodeButton.setVisible(false);
+            removeRouteNodeButton.setVisible(false);
+            moveRouteNodeButton.setVisible(false);
+            // Enable menu
+            menu.enableStartItem();
             newFrame.addToggleDialog(routingDialog);
         }
@@ -202,63 +201,63 @@
      * @see org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener#activeLayerChange(org.openstreetmap.josm.gui.layer.Layer, org.openstreetmap.josm.gui.layer.Layer)
      */
-	public void activeLayerChange(Layer oldLayer, Layer newLayer) {
-		routingDialog.refresh();
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener#layerAdded(org.openstreetmap.josm.gui.layer.Layer)
-	 */
-	public void layerAdded(Layer newLayer) {
-		// Add button(s) to the tool bar when the routing layer is added
-		if (newLayer instanceof RoutingLayer) {
-			addRouteNodeButton.setVisible(true);
-			removeRouteNodeButton.setVisible(true);
-			moveRouteNodeButton.setVisible(true);
-			menu.enableRestOfItems();
-			// Set layer on top and select layer, also refresh toggleDialog to reflect selection
-			Main.map.mapView.moveLayer(newLayer, 0);
-			logger.debug("Added routing layer.");
-		}
-	}
-
-	/*
-	 * (non-Javadoc)
-	 * @see org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener#layerRemoved(org.openstreetmap.josm.gui.layer.Layer)
-	 */
-	public void layerRemoved(Layer oldLayer) {
-		if ((oldLayer instanceof RoutingLayer) & (layers.size()==1)) {
-			// Remove button(s) from the tool bar when the last routing layer is removed
-			addRouteNodeButton.setVisible(false);
-			removeRouteNodeButton.setVisible(false);
-			moveRouteNodeButton.setVisible(false);
-			menu.disableRestOfItems();
-			layers.remove(oldLayer);
-    		logger.debug("Removed routing layer.");
-		} else if (oldLayer instanceof OsmDataLayer) {
-			// Remove all associated routing layers
-			// Convert to Array to prevent ConcurrentModificationException when removing layers from ArrayList
-			// FIXME: can't remove associated routing layers without triggering exceptions in some cases
-			RoutingLayer[] layersArray = layers.toArray(new RoutingLayer[0]);
-			for (int i=0;i<layersArray.length;i++) {
-				if (layersArray[i].getDataLayer().equals(oldLayer)) {
-					try {
-						// Remove layer
-						Main.map.mapView.removeLayer(layersArray[i]);
-					} catch (IllegalArgumentException e) {
-					}
-				}
-			}
-		}
-		// Reload RoutingDialog table model
-		routingDialog.refresh();
-	}
-
-	/* (non-Javadoc)
-	 * @see org.openstreetmap.josm.plugins.Plugin#getPreferenceSetting()
-	 */
-	@Override
-	public PreferenceSetting getPreferenceSetting() {
-		return preferenceSettings;
-	}
+    public void activeLayerChange(Layer oldLayer, Layer newLayer) {
+        routingDialog.refresh();
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener#layerAdded(org.openstreetmap.josm.gui.layer.Layer)
+     */
+    public void layerAdded(Layer newLayer) {
+        // Add button(s) to the tool bar when the routing layer is added
+        if (newLayer instanceof RoutingLayer) {
+            addRouteNodeButton.setVisible(true);
+            removeRouteNodeButton.setVisible(true);
+            moveRouteNodeButton.setVisible(true);
+            menu.enableRestOfItems();
+            // Set layer on top and select layer, also refresh toggleDialog to reflect selection
+            Main.map.mapView.moveLayer(newLayer, 0);
+            logger.debug("Added routing layer.");
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.openstreetmap.josm.gui.layer.Layer.LayerChangeListener#layerRemoved(org.openstreetmap.josm.gui.layer.Layer)
+     */
+    public void layerRemoved(Layer oldLayer) {
+        if ((oldLayer instanceof RoutingLayer) & (layers.size()==1)) {
+            // Remove button(s) from the tool bar when the last routing layer is removed
+            addRouteNodeButton.setVisible(false);
+            removeRouteNodeButton.setVisible(false);
+            moveRouteNodeButton.setVisible(false);
+            menu.disableRestOfItems();
+            layers.remove(oldLayer);
+            logger.debug("Removed routing layer.");
+        } else if (oldLayer instanceof OsmDataLayer) {
+            // Remove all associated routing layers
+            // Convert to Array to prevent ConcurrentModificationException when removing layers from ArrayList
+            // FIXME: can't remove associated routing layers without triggering exceptions in some cases
+            RoutingLayer[] layersArray = layers.toArray(new RoutingLayer[0]);
+            for (int i=0;i<layersArray.length;i++) {
+                if (layersArray[i].getDataLayer().equals(oldLayer)) {
+                    try {
+                        // Remove layer
+                        Main.map.mapView.removeLayer(layersArray[i]);
+                    } catch (IllegalArgumentException e) {
+                    }
+                }
+            }
+        }
+        // Reload RoutingDialog table model
+        routingDialog.refresh();
+    }
+
+    /* (non-Javadoc)
+     * @see org.openstreetmap.josm.plugins.Plugin#getPreferenceSetting()
+     */
+    @Override
+    public PreferenceSetting getPreferenceSetting() {
+        return preferenceSettings;
+    }
 }
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/AddRouteNodeAction.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/AddRouteNodeAction.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/AddRouteNodeAction.java	(revision 15707)
@@ -51,15 +51,15 @@
  */
 public class AddRouteNodeAction extends MapMode {
-	/**
-	 * Serial.
-	 */
-	private static final long serialVersionUID = 1L;
-	/**
-	 * Logger.
-	 */
-	static Logger logger = Logger.getLogger(AddRouteNodeAction.class);
-	/**
-	 * Routing Dialog.
-	 */
+    /**
+     * Serial.
+     */
+    private static final long serialVersionUID = 1L;
+    /**
+     * Logger.
+     */
+    static Logger logger = Logger.getLogger(AddRouteNodeAction.class);
+    /**
+     * Routing Dialog.
+     */
     private RoutingDialog routingDialog;
 
@@ -68,11 +68,11 @@
      * @param mapFrame
      */
-	public AddRouteNodeAction(MapFrame mapFrame) {
-		// TODO Use constructor with shortcut
-		super(tr("Routing"), "add",
-				tr("Click to add destination."),
-				mapFrame, ImageProvider.getCursor("crosshair", null));
+    public AddRouteNodeAction(MapFrame mapFrame) {
+        // TODO Use constructor with shortcut
+        super(tr("Routing"), "add",
+                tr("Click to add destination."),
+                mapFrame, ImageProvider.getCursor("crosshair", null));
         this.routingDialog = RoutingPlugin.getInstance().getRoutingDialog();
-	}
+    }
 
     @Override public void enterMode() {
@@ -89,11 +89,11 @@
         // If left button is clicked
         if (e.getButton() == MouseEvent.BUTTON1) {
-        	// Search for nearest highway node
-        	Node node = null;
-        	if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-        		RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
-        		node = layer.getNearestHighwayNode(e.getPoint());
+            // Search for nearest highway node
+            Node node = null;
+            if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
+                RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+                node = layer.getNearestHighwayNode(e.getPoint());
                 if(node == null) {
-                	logger.debug("no selected node");
+                    logger.debug("no selected node");
                     return;
                 }
@@ -101,5 +101,5 @@
                 layer.getRoutingModel().addNode(node);
                 routingDialog.addNode(node);
-        	}
+            }
         }
         Main.map.repaint();
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/MoveRouteNodeAction.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/MoveRouteNodeAction.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/MoveRouteNodeAction.java	(revision 15707)
@@ -54,22 +54,22 @@
  */
 public class MoveRouteNodeAction extends MapMode {
-	/**
-	 * Serial.
-	 */
-	private static final long serialVersionUID = 1L;
+    /**
+     * Serial.
+     */
+    private static final long serialVersionUID = 1L;
 
-	/**
-	 * Square of the distance radius where route nodes can be selected for dragging
-	 */
-	private static final int DRAG_SQR_RADIUS = 100;
+    /**
+     * Square of the distance radius where route nodes can be selected for dragging
+     */
+    private static final int DRAG_SQR_RADIUS = 100;
 
-	/**
-	 * Logger.
-	 */
-	static Logger logger = Logger.getLogger(RoutingLayer.class);
+    /**
+     * Logger.
+     */
+    static Logger logger = Logger.getLogger(RoutingLayer.class);
 
-	/**
-	 * Routing Dialog.
-	 */
+    /**
+     * Routing Dialog.
+     */
     private RoutingDialog routingDialog;
 
@@ -83,11 +83,11 @@
      * @param mapFrame
      */
-	public MoveRouteNodeAction(MapFrame mapFrame) {
-		// TODO Use constructor with shortcut
-		super(tr("Routing"), "move",
-				tr("Click and drag to move destination"),
-				mapFrame, ImageProvider.getCursor("normal", "move"));
+    public MoveRouteNodeAction(MapFrame mapFrame) {
+        // TODO Use constructor with shortcut
+        super(tr("Routing"), "move",
+                tr("Click and drag to move destination"),
+                mapFrame, ImageProvider.getCursor("normal", "move"));
         this.routingDialog = RoutingPlugin.getInstance().getRoutingDialog();
-	}
+    }
 
     @Override public void enterMode() {
@@ -104,29 +104,29 @@
         // If left button is pressed
         if (e.getButton() == MouseEvent.BUTTON1) {
-        	if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-        		RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
-        		RoutingModel routingModel = layer.getRoutingModel();
-            	// Search for the nearest node in the list
-            	List<Node> nl = routingModel.getSelectedNodes();
-            	index = -1;
-            	double dmax = DRAG_SQR_RADIUS; // maximum distance, in pixels
-               	for (int i=0;i<nl.size();i++) {
-               		Node node = nl.get(i);
-            		double d = Main.map.mapView.getPoint(node.eastNorth).distanceSq(e.getPoint());
-            		if (d < dmax) {
-            			dmax = d;
-            			index = i;
-            		}
-            	}
-               	if (index>=0)
+            if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
+                RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+                RoutingModel routingModel = layer.getRoutingModel();
+                // Search for the nearest node in the list
+                List<Node> nl = routingModel.getSelectedNodes();
+                index = -1;
+                double dmax = DRAG_SQR_RADIUS; // maximum distance, in pixels
+                for (int i=0;i<nl.size();i++) {
+                    Node node = nl.get(i);
+                    double d = Main.map.mapView.getPoint(node.eastNorth).distanceSq(e.getPoint());
+                    if (d < dmax) {
+                        dmax = d;
+                        index = i;
+                    }
+                }
+                if (index>=0)
                     logger.debug("Moved from node " + nl.get(index));
-        	}
+            }
         }
     }
 
     @Override public void mouseReleased(MouseEvent e) {
-    	// If left button is released and a route node is being dragged
-    	if ((e.getButton() == MouseEvent.BUTTON1) && (index>=0)) {
-    		searchAndReplaceNode(e.getPoint());
+        // If left button is released and a route node is being dragged
+        if ((e.getButton() == MouseEvent.BUTTON1) && (index>=0)) {
+            searchAndReplaceNode(e.getPoint());
         }
     }
@@ -136,21 +136,21 @@
 
     private void searchAndReplaceNode(Point point) {
-    	if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-    		RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
-    		RoutingModel routingModel = layer.getRoutingModel();
-        	// Search for nearest highway node
-        	Node node = null;
-    		node = layer.getNearestHighwayNode(point);
+        if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
+            RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+            RoutingModel routingModel = layer.getRoutingModel();
+            // Search for nearest highway node
+            Node node = null;
+            node = layer.getNearestHighwayNode(point);
             if (node == null) {
-            	logger.debug("Didn't found a close node to move to.");
+                logger.debug("Didn't found a close node to move to.");
                 return;
             }
             logger.debug("Moved to node " + node);
             routingModel.removeNode(index);
-    		routingDialog.removeNode(index);
+            routingDialog.removeNode(index);
             routingModel.insertNode(index, node);
-    		routingDialog.insertNode(index, node);
+            routingDialog.insertNode(index, node);
             Main.map.repaint();
-    	}
+        }
     }
 }
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/RemoveRouteNodeAction.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/RemoveRouteNodeAction.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/actions/RemoveRouteNodeAction.java	(revision 15707)
@@ -53,30 +53,30 @@
  */
 public class RemoveRouteNodeAction extends MapMode {
-	/**
-	 * Serial.
-	 */
-	private static final long serialVersionUID = 1L;
+    /**
+     * Serial.
+     */
+    private static final long serialVersionUID = 1L;
 
-	/**
-	 * Square of the distance radius where route nodes can be removed
-	 */
-	private static final int REMOVE_SQR_RADIUS = 100;
+    /**
+     * Square of the distance radius where route nodes can be removed
+     */
+    private static final int REMOVE_SQR_RADIUS = 100;
 
-	/**
-	 * Logger.
-	 */
-	static Logger logger = Logger.getLogger(RoutingLayer.class);
-	/**
-	 * Routing Dialog.
-	 */
+    /**
+     * Logger.
+     */
+    static Logger logger = Logger.getLogger(RoutingLayer.class);
+    /**
+     * Routing Dialog.
+     */
     private RoutingDialog routingDialog;
 
-	public RemoveRouteNodeAction(MapFrame mapFrame) {
-		// TODO Use constructor with shortcut
-		super(tr("Routing"), "remove",
-				tr("Click to remove destination"),
-				mapFrame, ImageProvider.getCursor("normal", "delete"));
+    public RemoveRouteNodeAction(MapFrame mapFrame) {
+        // TODO Use constructor with shortcut
+        super(tr("Routing"), "remove",
+                tr("Click to remove destination"),
+                mapFrame, ImageProvider.getCursor("normal", "delete"));
         this.routingDialog = RoutingPlugin.getInstance().getRoutingDialog();
-	}
+    }
 
     @Override public void enterMode() {
@@ -93,30 +93,30 @@
         // If left button is clicked
         if (e.getButton() == MouseEvent.BUTTON1) {
-        	if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-        		RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
-        		RoutingModel routingModel = layer.getRoutingModel();
-            	// Search for the nearest node in the list
-            	List<Node> nl = routingModel.getSelectedNodes();
-            	int index = -1;
-            	double dmax = REMOVE_SQR_RADIUS; // maximum distance, in pixels
-               	for (int i=0;i<nl.size();i++) {
-               		Node node = nl.get(i);
-            		double d = Main.map.mapView.getPoint(node.eastNorth).distanceSq(e.getPoint());
-            		if (d < dmax) {
-            			dmax = d;
-            			index = i;
-            		}
-            	}
-               	// If found a close node, remove it and recalculate route
+            if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
+                RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+                RoutingModel routingModel = layer.getRoutingModel();
+                // Search for the nearest node in the list
+                List<Node> nl = routingModel.getSelectedNodes();
+                int index = -1;
+                double dmax = REMOVE_SQR_RADIUS; // maximum distance, in pixels
+                for (int i=0;i<nl.size();i++) {
+                    Node node = nl.get(i);
+                    double d = Main.map.mapView.getPoint(node.eastNorth).distanceSq(e.getPoint());
+                    if (d < dmax) {
+                        dmax = d;
+                        index = i;
+                    }
+                }
+                // If found a close node, remove it and recalculate route
                 if (index >= 0) {
-                	// Remove node
-                	logger.debug("Removing node " + nl.get(index));
+                    // Remove node
+                    logger.debug("Removing node " + nl.get(index));
                     routingModel.removeNode(index);
-            		routingDialog.removeNode(index);
+                    routingDialog.removeNode(index);
                     Main.map.repaint();
                 } else {
-                	logger.debug("Can't find a node to remove.");
+                    logger.debug("Can't find a node to remove.");
                 }
-        	}
+            }
         }
     }
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingDialog.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingDialog.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingDialog.java	(revision 15707)
@@ -56,101 +56,101 @@
 public class RoutingDialog extends ToggleDialog {
 
-	private DefaultListModel model;
-	private JList jList = null;
-	private JScrollPane jScrollPane = null;
+    private DefaultListModel model;
+    private JList jList = null;
+    private JScrollPane jScrollPane = null;
 
-	/**
-	 * Serial UID
-	 */
-	private static final long serialVersionUID = 8625615652900341987L;
+    /**
+     * Serial UID
+     */
+    private static final long serialVersionUID = 8625615652900341987L;
 
-	public RoutingDialog() {
-		super(tr("Routing"), "routing", tr("Open a list of routing nodes"),
-				Shortcut.registerShortcut("subwindow:relations", tr("Toggle: {0}", tr("Routing")), KeyEvent.VK_R, Shortcut.GROUP_LAYER), 150);
-		model= new DefaultListModel();
-		this.setSize(456, 292);
-		this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
-		this.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED));
-		this.setName("PrincipalDialog");
-		this.setFont(new Font("Dialog", Font.PLAIN, 12));
-		this.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
-		this.add(getJScrollPane(), null);
+    public RoutingDialog() {
+        super(tr("Routing"), "routing", tr("Open a list of routing nodes"),
+                Shortcut.registerShortcut("subwindow:relations", tr("Toggle: {0}", tr("Routing")), KeyEvent.VK_R, Shortcut.GROUP_LAYER), 150);
+        model= new DefaultListModel();
+        this.setSize(456, 292);
+        this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
+        this.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.RAISED));
+        this.setName("PrincipalDialog");
+        this.setFont(new Font("Dialog", Font.PLAIN, 12));
+        this.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
+        this.add(getJScrollPane(), null);
 
-	}
+    }
 
-	/**
-	 * This method initializes jScrollPane
-	 *
-	 * @return javax.swing.JScrollPane
-	 */
-	private JScrollPane getJScrollPane() {
-		if (jScrollPane == null) {
-			jScrollPane = new JScrollPane();
-			jScrollPane.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
-			jScrollPane.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
-			jScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
-			jScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
-			jScrollPane.setName("nList");
-			jScrollPane.setViewportBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
-			jScrollPane.setViewportView(getJList());
-		}
-		return jScrollPane;
-	}
+    /**
+     * This method initializes jScrollPane
+     *
+     * @return javax.swing.JScrollPane
+     */
+    private JScrollPane getJScrollPane() {
+        if (jScrollPane == null) {
+            jScrollPane = new JScrollPane();
+            jScrollPane.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
+            jScrollPane.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
+            jScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
+            jScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
+            jScrollPane.setName("nList");
+            jScrollPane.setViewportBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));
+            jScrollPane.setViewportView(getJList());
+        }
+        return jScrollPane;
+    }
 
-	/**
-	 * This method initializes jList
-	 *
-	 * @return javax.swing.JList
-	 */
-	private JList getJList() {
-		if (jList == null) {
-			jList = new JList();
-			jList.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
-			jList.setModel(model);
-		}
-		return jList;
-	}
+    /**
+     * This method initializes jList
+     *
+     * @return javax.swing.JList
+     */
+    private JList getJList() {
+        if (jList == null) {
+            jList = new JList();
+            jList.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
+            jList.setModel(model);
+        }
+        return jList;
+    }
 
-	/**
-	 * Remove item from the list of nodes
-	 * @param index
-	 */
-	public void removeNode(int index) {
-		model.remove(index);
-	}
+    /**
+     * Remove item from the list of nodes
+     * @param index
+     */
+    public void removeNode(int index) {
+        model.remove(index);
+    }
 
-	/**
-	 * Add item to the list of nodes
-	 * @param obj
-	 */
-	public void addNode(Node n) {
-		model.addElement(n.id+" ["+n.coor.toDisplayString()+"]");
-	}
+    /**
+     * Add item to the list of nodes
+     * @param obj
+     */
+    public void addNode(Node n) {
+        model.addElement(n.id+" ["+n.coor.toDisplayString()+"]");
+    }
 
-	/**
-	 * Insert item to the list of nodes
-	 * @param index
-	 * @param obj
-	 */
-	public void insertNode(int index, Node n) {
-		model.insertElementAt(n.id+" ["+n.coor.toDisplayString()+"]", index);
-	}
+    /**
+     * Insert item to the list of nodes
+     * @param index
+     * @param obj
+     */
+    public void insertNode(int index, Node n) {
+        model.insertElementAt(n.id+" ["+n.coor.toDisplayString()+"]", index);
+    }
 
-	/**
-	 * Clear list of nodes
-	 */
-	public void clearNodes() {
-		model.clear();
-	}
+    /**
+     * Clear list of nodes
+     */
+    public void clearNodes() {
+        model.clear();
+    }
 
-	public void refresh() {
-		clearNodes();
-    	if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-    		RoutingLayer routingLayer = (RoutingLayer)Main.map.mapView.getActiveLayer();
-    		RoutingModel routingModel = routingLayer.getRoutingModel();
-    		for (Node n : routingModel.getSelectedNodes()) {
-    			addNode(n);
-    		}
-    	}
-	}
+    public void refresh() {
+        clearNodes();
+        if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
+            RoutingLayer routingLayer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+            RoutingModel routingModel = routingLayer.getRoutingModel();
+            for (Node n : routingModel.getSelectedNodes()) {
+                addNode(n);
+            }
+        }
+    }
 }
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingMenu.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingMenu.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingMenu.java	(revision 15707)
@@ -34,4 +34,5 @@
 import java.awt.event.ItemEvent;
 import java.awt.event.ItemListener;
+import java.awt.event.KeyEvent;
 
 import javax.swing.ButtonGroup;
@@ -42,4 +43,5 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.MainMenu;
 
 import com.innovant.josm.jrt.core.RoutingGraph.RouteType;
@@ -55,138 +57,137 @@
 public class RoutingMenu extends JMenu {
 
-	/**
-	 * Default serial version UID
-	 */
-	private static final long serialVersionUID = 3559922048225708480L;
+    /**
+     * Default serial version UID
+     */
+    private static final long serialVersionUID = 3559922048225708480L;
 
-	private JMenuItem startMI;
-	private JMenuItem reverseMI;
-	private JMenuItem clearMI;
-	private JMenu criteriaM;
+    private JMenuItem startMI;
+    private JMenuItem reverseMI;
+    private JMenuItem clearMI;
+    private JMenu criteriaM;
+    private JMenu menu;
 
-	/**
-	 * @param s
-	 */
-	public RoutingMenu(final String name) {
-		super(name);
+    /**
+     * @param s
+     */
+    public RoutingMenu(final String name) {
+        MainMenu mm = Main.main.menu;
+        menu = mm.addMenu(name, KeyEvent.VK_R, mm.defaultMenuPos);
 
-		JMenuItem mi;
-		JMenu m;
+        startMI = new JMenuItem(tr("Add routing layer"));
+        startMI.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                RoutingPlugin.getInstance().addLayer();
+            }
+        });
+        menu.add(startMI);
 
-		startMI = new JMenuItem(tr("Add routing layer"));
-		startMI.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				RoutingPlugin.getInstance().addLayer();
-			}
-		});
-		this.add(startMI);
+        menu.addSeparator();
+        ButtonGroup group = new ButtonGroup();
 
-		this.addSeparator();
-		ButtonGroup group = new ButtonGroup();
+        criteriaM = new JMenu(tr("Criteria"));
 
-		criteriaM = new JMenu(tr("Criteria"));
+        JRadioButtonMenuItem rshorter = new JRadioButtonMenuItem(tr("Shortest"));
+        rshorter.setSelected(true);
+        rshorter.addItemListener(new ItemListener() {
+            public void itemStateChanged(ItemEvent e) {
+                if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
+                    RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+                    RoutingModel routingModel = layer.getRoutingModel();
+                    if (e.getStateChange()==ItemEvent.SELECTED) {
+                        routingModel.routingGraph.setTypeRoute(RouteType.SHORTEST);
+                    } else {
+                        routingModel.routingGraph.setTypeRoute(RouteType.FASTEST);
+                    }
+                //  routingModel.routingGraph.resetGraph();
+                //  routingModel.routingGraph.createGraph();
+                    //TODO: Change this way
+                    //FIXME: do not change node but recalculate routing.
+                    routingModel.setNodesChanged();
+                    Main.map.repaint();
+                }
+            }
 
-		JRadioButtonMenuItem rshorter = new JRadioButtonMenuItem(tr("Shortest"));
-		rshorter.setSelected(true);
-		rshorter.addItemListener(new ItemListener() {
-			public void itemStateChanged(ItemEvent e) {
-	        	if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-	        		RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
-	        		RoutingModel routingModel = layer.getRoutingModel();
-					if (e.getStateChange()==ItemEvent.SELECTED) {
-						routingModel.routingGraph.setTypeRoute(RouteType.SHORTEST);
-					} else {
-						routingModel.routingGraph.setTypeRoute(RouteType.FASTEST);
-					}
-				//	routingModel.routingGraph.resetGraph();
-				//	routingModel.routingGraph.createGraph();
-					//TODO: Change this way
-					//FIXME: do not change node but recalculate routing.
-					routingModel.setNodesChanged();
-					Main.map.repaint();
-	        	}
-			}
+        });
 
-		});
+        JRadioButtonMenuItem rfaster = new JRadioButtonMenuItem(tr("Fastest"));
+        group.add(rshorter);
+        group.add(rfaster);
+        criteriaM.add(rshorter);
+        criteriaM.add(rfaster);
 
-		JRadioButtonMenuItem rfaster = new JRadioButtonMenuItem(tr("Fastest"));
-		group.add(rshorter);
-		group.add(rfaster);
-		criteriaM.add(rshorter);
-		criteriaM.add(rfaster);
+        criteriaM.addSeparator();
+        JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem("Ignore oneways");
+        cbmi.addItemListener(new ItemListener() {
+            public void itemStateChanged(ItemEvent e) {
+                if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
+                    RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+                    RoutingModel routingModel = layer.getRoutingModel();
+                    if (e.getStateChange()==ItemEvent.SELECTED)
+                        routingModel.routingGraph.getRoutingProfile().setOnewayUse(false);
+                    else
+                        routingModel.routingGraph.getRoutingProfile().setOnewayUse(true);
+                    routingModel.setNodesChanged();
+                    Main.map.repaint();
+                }
+            }
+        });
+        criteriaM.add(cbmi);
+        menu.add(criteriaM);
 
-		criteriaM.addSeparator();
-		JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem("Ignore oneways");
-		cbmi.addItemListener(new ItemListener() {
-			public void itemStateChanged(ItemEvent e) {
-	        	if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-	        		RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
-	        		RoutingModel routingModel = layer.getRoutingModel();
-					if (e.getStateChange()==ItemEvent.SELECTED)
-						routingModel.routingGraph.getRoutingProfile().setOnewayUse(false);
-					else
-						routingModel.routingGraph.getRoutingProfile().setOnewayUse(true);
-					routingModel.setNodesChanged();
-					Main.map.repaint();
-	        	}
-			}
-		});
-		criteriaM.add(cbmi);
-		this.add(criteriaM);
+        menu.addSeparator();
+        reverseMI = new JMenuItem(tr("Reverse route"));
+        reverseMI.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
+                    RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+                    RoutingModel routingModel = layer.getRoutingModel();
+                    routingModel.reverseNodes();
+                    Main.map.repaint();
+                }
+            }
+        });
+        menu.add(reverseMI);
 
-		this.addSeparator();
-		reverseMI = new JMenuItem(tr("Reverse route"));
-		reverseMI.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-	        	if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-	        		RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
-	        		RoutingModel routingModel = layer.getRoutingModel();
-					routingModel.reverseNodes();
-					Main.map.repaint();
-	        	}
-			}
-		});
-		this.add(reverseMI);
+        clearMI = new JMenuItem(tr("Clear route"));
+        clearMI.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
+                    RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
+                    RoutingModel routingModel = layer.getRoutingModel();
+                    // Reset routing nodes and paths
+                    routingModel.reset();
+                    RoutingPlugin.getInstance().getRoutingDialog().clearNodes();
+                    Main.map.repaint();
+                }
+            }
+        });
+        menu.add(clearMI);
 
-		clearMI = new JMenuItem(tr("Clear route"));
-		clearMI.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-	        	if (Main.map.mapView.getActiveLayer() instanceof RoutingLayer) {
-	        		RoutingLayer layer = (RoutingLayer)Main.map.mapView.getActiveLayer();
-	        		RoutingModel routingModel = layer.getRoutingModel();
-					// Reset routing nodes and paths
-					routingModel.reset();
-					RoutingPlugin.getInstance().getRoutingDialog().clearNodes();
-					Main.map.repaint();
-	        	}
-			}
-		});
-		this.add(clearMI);
+        // Initially disabled
+        disableAllItems();
+    }
 
-		// Initially disabled
-		disableAllItems();
-	}
+    public void disableAllItems() {
+        startMI.setEnabled(false);
+        reverseMI.setEnabled(false);
+        clearMI.setEnabled(false);
+        criteriaM.setEnabled(false);
+    }
 
-	public void disableAllItems() {
-		startMI.setEnabled(false);
-		reverseMI.setEnabled(false);
-		clearMI.setEnabled(false);
-		criteriaM.setEnabled(false);
-	}
+    public void enableStartItem() {
+        startMI.setEnabled(true);
+    }
 
-	public void enableStartItem() {
-		startMI.setEnabled(true);
-	}
+    public void enableRestOfItems() {
+        reverseMI.setEnabled(true);
+        clearMI.setEnabled(true);
+        criteriaM.setEnabled(true);
+    }
 
-	public void enableRestOfItems() {
-		reverseMI.setEnabled(true);
-		clearMI.setEnabled(true);
-		criteriaM.setEnabled(true);
-	}
-
-	public void disableRestOfItems() {
-		reverseMI.setEnabled(false);
-		clearMI.setEnabled(false);
-		criteriaM.setEnabled(false);
-	}
+    public void disableRestOfItems() {
+        reverseMI.setEnabled(false);
+        clearMI.setEnabled(false);
+        criteriaM.setEnabled(false);
+    }
 }
Index: applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingPreferenceDialog.java
===================================================================
--- applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingPreferenceDialog.java	(revision 15106)
+++ applications/editors/josm/plugins/routing/src/com/innovant/josm/plugin/routing/gui/RoutingPreferenceDialog.java	(revision 15707)
@@ -64,172 +64,172 @@
 public class RoutingPreferenceDialog implements PreferenceSetting {
 
-	/**
-	 * Logger
-	 */
-	static Logger logger = Logger.getLogger(RoutingPreferenceDialog.class);
-
-	private Map<String, String> orig;
-	private DefaultTableModel model;
-
-	/**
-	 * Constructor
-	 */
-	public RoutingPreferenceDialog() {
-		super();
-		readPreferences();
-	}
-
-	public void addGui(final PreferenceDialog gui) {
-
-		JPanel principal = gui.createPreferenceTab("routing",
-				tr("Routing Plugin Preferences"), tr("Configure routing preferences."));
-
-		JPanel p = new JPanel();
-		p.setLayout(new GridBagLayout());
-
-		model = new DefaultTableModel(new String[] { tr("Highway type"),
-				tr("Speed (Km/h)") }, 0) {
-			private static final long serialVersionUID = 4253339034781567453L;
-
-			@Override
-			public boolean isCellEditable(int row, int column) {
-				return column != 0;
-			}
-		};
-		final JTable list = new JTable(model);
-		loadSpeeds(model);
-
-		JScrollPane scroll = new JScrollPane(list);
-
-		p.add(scroll, GBC.eol().fill(GBC.BOTH));
-		scroll.setPreferredSize(new Dimension(200, 200));
-
-		JButton add = new JButton(tr("Add"));
-		p.add(Box.createHorizontalGlue(), GBC.std().fill(GBC.HORIZONTAL));
-		p.add(add, GBC.std().insets(0, 5, 0, 0));
-		add.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				JPanel p = new JPanel(new GridBagLayout());
-				p.add(new JLabel(tr("Weight")), GBC.std().insets(0, 0, 5, 0));
-				JComboBox key = new JComboBox();
-				for (OsmWayTypes pk : OsmWayTypes.values())
-					key.addItem(pk.getTag());
-				JTextField value = new JTextField(10);
-				p.add(key, GBC.eop().insets(5, 0, 0, 0).fill(GBC.HORIZONTAL));
-				p.add(new JLabel(tr("Value")), GBC.std().insets(0, 0, 5, 0));
-				p.add(value, GBC.eol().insets(5, 0, 0, 0).fill(GBC.HORIZONTAL));
-				int answer = JOptionPane.showConfirmDialog(gui, p,
-						tr("Enter weight values"),
-						JOptionPane.OK_CANCEL_OPTION);
-				if (answer == JOptionPane.OK_OPTION) {
-					model
-					.addRow(new String[] {
-							key.getSelectedItem().toString(),
-							value.getText() });
-				}
-			}
-		});
-
-		JButton delete = new JButton(tr("Delete"));
-		p.add(delete, GBC.std().insets(0, 5, 0, 0));
-		delete.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				if (list.getSelectedRow() == -1)
-					JOptionPane.showMessageDialog(gui,
-							tr("Please select the row to delete."));
-				else {
-					Integer i;
-					while ((i = list.getSelectedRow()) != -1)
-						model.removeRow(i);
-				}
-			}
-		});
-
-		JButton edit = new JButton(tr("Edit"));
-		p.add(edit, GBC.std().insets(5, 5, 5, 0));
-		edit.addActionListener(new ActionListener() {
-			public void actionPerformed(ActionEvent e) {
-				edit(gui, list);
-			}
-		});
-
-		JTabbedPane Opciones = new JTabbedPane();
-		Opciones.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
-
-		Opciones.addTab("Profile", null, p, null);
-//		Opciones.addTab("Preferences", new JPanel());
-
-		list.addMouseListener(new MouseAdapter(){
-			@Override public void mouseClicked(MouseEvent e) {
-				if (e.getClickCount() == 2)
-					edit(gui, list);
-			}
-		});
-
-		principal.add(Opciones, GBC.eol().fill(GBC.BOTH));
-
-	}
-
-	public boolean ok() {
-		for (int i = 0; i < model.getRowCount(); ++i) {
-			String value = model.getValueAt(i, 1).toString();
-			if (value.length() != 0) {
-				String key = model.getValueAt(i, 0).toString();
-				String origValue = orig.get(key);
-				if (origValue == null || !origValue.equals(value))
-					Main.pref.put(key, value);
-				orig.remove(key); // processed.
-			}
-		}
-		for (Entry<String, String> e : orig.entrySet())
-			Main.pref.put(e.getKey(), null);
-		return false;
-	}
-
-	private void edit(final PreferenceDialog gui, final JTable list) {
-		if (list.getSelectedRowCount() != 1) {
-			JOptionPane.showMessageDialog(gui,
-					tr("Please select the row to edit."));
-			return;
-		}
-		String v = JOptionPane.showInputDialog(tr("New value for {0}", model
-				.getValueAt(list.getSelectedRow(), 0)), model.getValueAt(list
-						.getSelectedRow(), 1));
-		if (v != null)
-			model.setValueAt(v, list.getSelectedRow(), 1);
-	}
-
-	private void loadSpeeds(DefaultTableModel model) {
-		// Read dialog values from preferences
-		readPreferences();
-		// Put these values in the model
-		for (String tag : orig.keySet()) {
-			model.addRow(new String[] { tag, orig.get(tag) });
-		}
-	}
-
-	private void readPreferences() {
-		orig = Main.pref.getAllPrefix("routing.profile.default.speed");
-		if (orig.size() == 0) { // defaults
-			logger.debug("Loading Default Preferences.");
-			for (OsmWayTypes owt : OsmWayTypes.values()) {
-				Main.pref.putInteger("routing.profile.default.speed."
-						+ owt.getTag(), owt.getSpeed());
-			}
-			orig = Main.pref.getAllPrefix("routing.profile.default.speed");
-		}
-		else logger.debug("Default preferences already exist.");
-	}
-
-	private String getKeyTag(String tag) {
-		return tag.split(".", 5)[4];
-	}
-
-	private String getTypeTag(String tag) {
-		return tag.split(".", 5)[3];
-	}
-
-	private String getNameTag(String tag) {
-		return tag.split(".", 5)[2];
-	}
+    /**
+     * Logger
+     */
+    static Logger logger = Logger.getLogger(RoutingPreferenceDialog.class);
+
+    private Map<String, String> orig;
+    private DefaultTableModel model;
+
+    /**
+     * Constructor
+     */
+    public RoutingPreferenceDialog() {
+        super();
+        readPreferences();
+    }
+
+    public void addGui(final PreferenceDialog gui) {
+
+        JPanel principal = gui.createPreferenceTab("routing",
+                tr("Routing Plugin Preferences"), tr("Configure routing preferences."));
+
+        JPanel p = new JPanel();
+        p.setLayout(new GridBagLayout());
+
+        model = new DefaultTableModel(new String[] { tr("Highway type"),
+                tr("Speed (Km/h)") }, 0) {
+            private static final long serialVersionUID = 4253339034781567453L;
+
+            @Override
+            public boolean isCellEditable(int row, int column) {
+                return column != 0;
+            }
+        };
+        final JTable list = new JTable(model);
+        loadSpeeds(model);
+
+        JScrollPane scroll = new JScrollPane(list);
+
+        p.add(scroll, GBC.eol().fill(GBC.BOTH));
+        scroll.setPreferredSize(new Dimension(200, 200));
+
+        JButton add = new JButton(tr("Add"));
+        p.add(Box.createHorizontalGlue(), GBC.std().fill(GBC.HORIZONTAL));
+        p.add(add, GBC.std().insets(0, 5, 0, 0));
+        add.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                JPanel p = new JPanel(new GridBagLayout());
+                p.add(new JLabel(tr("Weight")), GBC.std().insets(0, 0, 5, 0));
+                JComboBox key = new JComboBox();
+                for (OsmWayTypes pk : OsmWayTypes.values())
+                    key.addItem(pk.getTag());
+                JTextField value = new JTextField(10);
+                p.add(key, GBC.eop().insets(5, 0, 0, 0).fill(GBC.HORIZONTAL));
+                p.add(new JLabel(tr("Value")), GBC.std().insets(0, 0, 5, 0));
+                p.add(value, GBC.eol().insets(5, 0, 0, 0).fill(GBC.HORIZONTAL));
+                int answer = JOptionPane.showConfirmDialog(gui, p,
+                        tr("Enter weight values"),
+                        JOptionPane.OK_CANCEL_OPTION);
+                if (answer == JOptionPane.OK_OPTION) {
+                    model
+                    .addRow(new String[] {
+                            key.getSelectedItem().toString(),
+                            value.getText() });
+                }
+            }
+        });
+
+        JButton delete = new JButton(tr("Delete"));
+        p.add(delete, GBC.std().insets(0, 5, 0, 0));
+        delete.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                if (list.getSelectedRow() == -1)
+                    JOptionPane.showMessageDialog(gui,
+                            tr("Please select the row to delete."));
+                else {
+                    Integer i;
+                    while ((i = list.getSelectedRow()) != -1)
+                        model.removeRow(i);
+                }
+            }
+        });
+
+        JButton edit = new JButton(tr("Edit"));
+        p.add(edit, GBC.std().insets(5, 5, 5, 0));
+        edit.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent e) {
+                edit(gui, list);
+            }
+        });
+
+        JTabbedPane Opciones = new JTabbedPane();
+        Opciones.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
+
+        Opciones.addTab("Profile", null, p, null);
+//      Opciones.addTab("Preferences", new JPanel());
+
+        list.addMouseListener(new MouseAdapter(){
+            @Override public void mouseClicked(MouseEvent e) {
+                if (e.getClickCount() == 2)
+                    edit(gui, list);
+            }
+        });
+
+        principal.add(Opciones, GBC.eol().fill(GBC.BOTH));
+
+    }
+
+    public boolean ok() {
+        for (int i = 0; i < model.getRowCount(); ++i) {
+            String value = model.getValueAt(i, 1).toString();
+            if (value.length() != 0) {
+                String key = model.getValueAt(i, 0).toString();
+                String origValue = orig.get(key);
+                if (origValue == null || !origValue.equals(value))
+                    Main.pref.put(key, value);
+                orig.remove(key); // processed.
+            }
+        }
+        for (Entry<String, String> e : orig.entrySet())
+            Main.pref.put(e.getKey(), null);
+        return false;
+    }
+
+    private void edit(final PreferenceDialog gui, final JTable list) {
+        if (list.getSelectedRowCount() != 1) {
+            JOptionPane.showMessageDialog(gui,
+                    tr("Please select the row to edit."));
+            return;
+        }
+        String v = JOptionPane.showInputDialog(tr("New value for {0}", model
+                .getValueAt(list.getSelectedRow(), 0)), model.getValueAt(list
+                        .getSelectedRow(), 1));
+        if (v != null)
+            model.setValueAt(v, list.getSelectedRow(), 1);
+    }
+
+    private void loadSpeeds(DefaultTableModel model) {
+        // Read dialog values from preferences
+        readPreferences();
+        // Put these values in the model
+        for (String tag : orig.keySet()) {
+            model.addRow(new String[] { tag, orig.get(tag) });
+        }
+    }
+
+    private void readPreferences() {
+        orig = Main.pref.getAllPrefix("routing.profile.default.speed");
+        if (orig.size() == 0) { // defaults
+            logger.debug("Loading Default Preferences.");
+            for (OsmWayTypes owt : OsmWayTypes.values()) {
+                Main.pref.putInteger("routing.profile.default.speed."
+                        + owt.getTag(), owt.getSpeed());
+            }
+            orig = Main.pref.getAllPrefix("routing.profile.default.speed");
+        }
+        else logger.debug("Default preferences already exist.");
+    }
+
+    private String getKeyTag(String tag) {
+        return tag.split(".", 5)[4];
+    }
+
+    private String getTypeTag(String tag) {
+        return tag.split(".", 5)[3];
+    }
+
+    private String getNameTag(String tag) {
+        return tag.split(".", 5)[2];
+    }
 }
