Index: applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/gui/PTAssistantLayer.java
===================================================================
--- applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/gui/PTAssistantLayer.java	(revision 32646)
+++ applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/gui/PTAssistantLayer.java	(revision 32647)
@@ -38,12 +38,21 @@
 		implements SelectionChangedListener, PropertyChangeListener, LayerChangeListener {
 
+	private static PTAssistantLayer layer;
 	private List<OsmPrimitive> primitives = new ArrayList<>();
 	private PTAssistantPaintVisitor paintVisitor;
-
-	public PTAssistantLayer() {
+	
+	private PTAssistantLayer() {
 		super("pt_assistant layer");
 		KeyboardFocusManager.getCurrentKeyboardFocusManager().addPropertyChangeListener(this);
 		Main.getLayerManager().addLayerChangeListener(this);
-
+		layer = this;
+
+	}
+	
+	public static PTAssistantLayer getLayer() {
+		if (layer == null) {
+			new PTAssistantLayer();
+		}
+		return layer;
 	}
 
@@ -159,22 +168,7 @@
 
 				if (RouteUtils.isTwoDirectionRoute(relation)) {
-
-					this.primitives.clear();
-					this.primitives.add(relation);
-					if (!Main.getLayerManager().containsLayer(this)) {
-						Main.getLayerManager().addLayer(this);
-					}
-
-					if (paintVisitor == null) {
-						Graphics g = Main.map.mapView.getGraphics();
-						MapView mv = Main.map.mapView;
-						paintVisitor = new PTAssistantPaintVisitor(g, mv);
-					}
-
-					for (OsmPrimitive primitive : primitives) {
-						paintVisitor.visit(primitive);
-					}
-
-					Main.map.mapView.repaint();
+					
+					this.repaint(relation);
+
 				}
 
@@ -182,5 +176,32 @@
 		}
 	}
-
+	
+	
+	
+	/**
+	 * Repaints the layer in cases when there was no selection change
+	 * @param relation
+	 */
+	public void repaint(Relation relation) {
+		this.primitives.clear();
+		this.primitives.add(relation);
+		if (!Main.getLayerManager().containsLayer(this)) {
+			Main.getLayerManager().addLayer(this);
+		}
+
+		if (paintVisitor == null) {
+			Graphics g = Main.map.mapView.getGraphics();
+			MapView mv = Main.map.mapView;
+			paintVisitor = new PTAssistantPaintVisitor(g, mv);
+		}
+
+		for (OsmPrimitive primitive : primitives) {
+			paintVisitor.visit(primitive);
+		}
+
+		Main.map.mapView.repaint();
+	}
+	
+	
 	@Override
 	public void layerAdded(LayerAddEvent arg0) {
Index: applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/utils/RouteUtils.java
===================================================================
--- applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/utils/RouteUtils.java	(revision 32646)
+++ applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/utils/RouteUtils.java	(revision 32647)
@@ -1,3 +1,5 @@
 package org.openstreetmap.josm.plugins.pt_assistant.utils;
+
+import java.util.Collection;
 
 import org.openstreetmap.josm.data.osm.Node;
@@ -30,9 +32,9 @@
 	 */
 	public static boolean isTwoDirectionRoute(Relation r) {
-		
+
 		if (r == null) {
 			return false;
 		}
-		
+
 		if (!r.hasKey("route") || !r.hasTag("public_transport:version", "2")) {
 			return false;
@@ -156,4 +158,5 @@
 	/**
 	 * Checks if the ways have a common node
+	 * 
 	 * @param w1
 	 * @param w2
@@ -178,5 +181,30 @@
 		return false;
 	}
-	
+
+	/**
+	 * Checks if any way from the first collection touches any way from the
+	 * second collection
+	 * 
+	 * @param c1 first collection
+	 * @param c2 second collection
+	 * @return true if ways touch, false otherwise
+	 */
+	public static boolean waysTouch(Collection<Way> c1, Collection<Way> c2) {
+
+		if (c1 == null || c2 == null) {
+			return false;
+		}
+
+		for (Way w1 : c1) {
+			for (Way w2 : c2) {
+				if (waysTouch(w1, w2)) {
+					return true;
+				}
+			}
+		}
+
+		return false;
+	}
+
 	/**
 	 * Checks if the type of the way is suitable for buses to go on it. The
@@ -207,16 +235,15 @@
 		return false;
 	}
-	
+
 	public static boolean isWaySuitableForPublicTransport(Way way) {
-		
-		if (isWaySuitableForBuses(way) || way.hasTag("railway", "tram")
-				|| way.hasTag("railway", "subway") || way.hasTag("raiilway", "subway")
-				|| way.hasTag("railway", "light_rail")
+
+		if (isWaySuitableForBuses(way) || way.hasTag("railway", "tram") || way.hasTag("railway", "subway")
+				|| way.hasTag("raiilway", "subway") || way.hasTag("railway", "light_rail")
 				|| way.hasTag("railway", "train")) {
 			return true;
 		}
-		
-		return false;
-		
+
+		return false;
+
 	}
 
Index: applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/NodeChecker.java
===================================================================
--- applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/NodeChecker.java	(revision 32646)
+++ applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/NodeChecker.java	(revision 32647)
@@ -73,4 +73,8 @@
 		}
 	}
+	
+	public static void fixError() {
+		
+	}
 
 }
Index: applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/PTAssistantValidatorTest.java
===================================================================
--- applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/PTAssistantValidatorTest.java	(revision 32646)
+++ applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/PTAssistantValidatorTest.java	(revision 32647)
@@ -44,5 +44,5 @@
 				tr("Check if route relations are compatible with public transport version 2"));
 
-		layer = new PTAssistantLayer();
+		layer = PTAssistantLayer.getLayer();
 		DataSet.addSelectionListener(layer);
 
@@ -333,5 +333,5 @@
 		if (testError.getCode() == ERROR_CODE_DIRECTION) {
 			commands.add(WayChecker.fixErrorByZooming(testError));
-
+			
 		}
 
Index: applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/WayChecker.java
===================================================================
--- applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/WayChecker.java	(revision 32646)
+++ applications/editors/josm/plugins/pt_assistant/src/org/openstreetmap/josm/plugins/pt_assistant/validation/WayChecker.java	(revision 32647)
@@ -16,5 +16,4 @@
 import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.command.SelectCommand;
-import org.openstreetmap.josm.command.SequenceCommand;
 import org.openstreetmap.josm.data.osm.Node;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
@@ -29,4 +28,5 @@
 import org.openstreetmap.josm.gui.dialogs.relation.RelationEditor;
 import org.openstreetmap.josm.gui.layer.OsmDataLayer;
+import org.openstreetmap.josm.plugins.pt_assistant.gui.PTAssistantLayer;
 import org.openstreetmap.josm.plugins.pt_assistant.utils.RouteUtils;
 
@@ -194,38 +194,41 @@
 		}
 
+		List<Relation> primitives = new ArrayList<>(1);
+		primitives.add(this.relation);
+
+		List<Set<Way>> listOfSets = new ArrayList<>();
 		for (Way problematicWay : problematicWays) {
-
-			List<Relation> primitives = new ArrayList<>(1);
-			primitives.add(relation);
-			List<Way> highlighted = new ArrayList<>(1);
-			// highlighted.add(problematicWay);
-			Set<Way> adjacentWays = checkAdjacentWays(problematicWay, new HashSet<Way>());
-			adjacentWays.removeAll(problematicWays);
-			highlighted.add(problematicWay);
-			highlighted.addAll(adjacentWays);
+			Set<Way> primitivesToReport = new HashSet<>();
+			primitivesToReport.add(problematicWay);
+			primitivesToReport.addAll(checkAdjacentWays(problematicWay, new HashSet<Way>()));
+			listOfSets.add(primitivesToReport);
+		}
+		
+		boolean changed = true;
+		while (changed) {
+			changed = false;
+			for (int i = 0; i < listOfSets.size(); i++) {
+				for (int j = i; j < listOfSets.size(); j++) {
+					if (i != j && RouteUtils.waysTouch(listOfSets.get(i), listOfSets.get(j))) {
+						listOfSets.get(i).addAll(listOfSets.get(j));
+						listOfSets.remove(j);
+						j = listOfSets.size();
+						changed = true;
+					}
+				}
+			}
+		}
+
+		for (Set<Way> currentSet : listOfSets) {
 			TestError e = new TestError(this.test, Severity.WARNING,
 					tr("PT: Route passes a oneway road in the wrong direction"),
-					PTAssistantValidatorTest.ERROR_CODE_DIRECTION, primitives, highlighted);
+					PTAssistantValidatorTest.ERROR_CODE_DIRECTION, primitives, currentSet);
 			this.errors.add(e);
 		}
 
-//		Set<Way> primitivesToReport = new HashSet<>();
-//		primitivesToReport.addAll(problematicWays);
-//		for (Way problematicWay : problematicWays) {
-//			Set<Way> adjacentWays = checkAdjacentWays(problematicWay, new HashSet<Way>());
-//			primitivesToReport.addAll(adjacentWays);
-//		}
-//
-//		List<Relation> primitives = new ArrayList<>(1);
-//		primitives.add(relation);
-//		TestError e = new TestError(this.test, Severity.WARNING,
-//				tr("PT: Route passes a oneway road in the wrong direction"),
-//				PTAssistantValidatorTest.ERROR_CODE_DIRECTION, primitives, primitivesToReport);
-//		this.errors.add(e);
-
 	}
 
 	/**
-	 * Checks if the current way touches its neighbouring was correctly
+	 * Checks if the current way touches its neighboring was correctly
 	 * 
 	 * @param prev
@@ -454,19 +457,12 @@
 		}
 
-		ArrayList<Command> commands = new ArrayList<>();
-
 		Collection<? extends OsmPrimitive> primitives = testError.getPrimitives();
 		Relation originalRelation = (Relation) primitives.iterator().next();
-		ArrayList<OsmPrimitive> primitivesToSelect = new ArrayList<>(1);
-		primitivesToSelect.add(originalRelation);
-		Collection<?> highlighted = testError.getHighlighted();
-		Way wayToHighlight = (Way) highlighted.iterator().next();
-		ArrayList<OsmPrimitive> primitivesToZoom = new ArrayList<>(1);
-		primitivesToZoom.add(wayToHighlight);
-
-		SelectCommand command1 = new SelectCommand(primitivesToSelect);
-		commands.add(command1);
-		SelectCommand command2 = new SelectCommand(primitivesToZoom);
-		commands.add(command2);
+		ArrayList<OsmPrimitive> primitivesToZoom = new ArrayList<>();
+		for (Object primitiveToZoom : testError.getHighlighted()) {
+			primitivesToZoom.add((OsmPrimitive) primitiveToZoom);
+		}
+
+		SelectCommand command = new SelectCommand(primitivesToZoom);
 
 		List<OsmDataLayer> listOfLayers = Main.getLayerManager().getLayersOfType(OsmDataLayer.class);
@@ -495,5 +491,5 @@
 				}
 
-				return new SequenceCommand(null, commands);
+				return command;
 			}
 		}
@@ -507,8 +503,4 @@
 		// zoom to problem:
 		AutoScaleAction.zoomTo(primitives);
-
-		// create editor:
-		GenericRelationEditor editor = (GenericRelationEditor) RelationEditor.getEditor(layer, r,
-				r.getMembersFor(primitives));
 
 		// put stop-related members to the front and edit roles if necessary:
@@ -516,8 +508,16 @@
 		sortedRelationMembers.addAll(listNotStopMembers(r));
 		r.setMembers(sortedRelationMembers);
-		editor.reloadDataFromRelation();
+
+		// create editor:
+		GenericRelationEditor editor = (GenericRelationEditor) RelationEditor.getEditor(layer, r,
+				r.getMembersFor(primitives));
 
 		// open editor:
 		editor.setVisible(true);
+		editor.setFocusable(true);
+		editor.requestFocusInWindow();
+
+		// make the current relation purple in the pt_assistant layer:
+		PTAssistantLayer.getLayer().repaint(r);
 
 	}
Index: applications/editors/josm/plugins/pt_assistant/test/unit/org/openstreetmap/josm/plugins/pt_assistant/validation/DirecionTestTest.java
===================================================================
--- applications/editors/josm/plugins/pt_assistant/test/unit/org/openstreetmap/josm/plugins/pt_assistant/validation/DirecionTestTest.java	(revision 32646)
+++ applications/editors/josm/plugins/pt_assistant/test/unit/org/openstreetmap/josm/plugins/pt_assistant/validation/DirecionTestTest.java	(revision 32647)
@@ -6,4 +6,5 @@
 import java.io.File;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 
@@ -44,13 +45,13 @@
 		assertEquals(onewayErrorCaught, 2);
 
-		// fix the direction errors:
-
 		boolean detectedErrorsAreCorrect = true;
 		for (TestError e : errors) {
 			if (e.getCode() == PTAssistantValidatorTest.ERROR_CODE_DIRECTION) {
 				@SuppressWarnings("unchecked")
-				List<OsmPrimitive> highlighted = (List<OsmPrimitive>) e.getHighlighted();
-				if (highlighted.get(0).getId() != 225732678 && highlighted.get(0).getId() != 24215210) {
-					detectedErrorsAreCorrect = false;
+				Collection<OsmPrimitive> highlighted = (Collection<OsmPrimitive>) e.getHighlighted();
+				for (OsmPrimitive highlightedPrimitive: highlighted) {
+					if (highlightedPrimitive.getId() != 225732678 && highlightedPrimitive.getId() != 24215210) {
+						detectedErrorsAreCorrect = false;
+					}
 				}
 			}
