Index: applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysAction.java
===================================================================
--- applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysAction.java	(revision 30344)
+++ applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysAction.java	(revision 30345)
@@ -32,7 +32,7 @@
                 tr("Makes a pair of selected way segments parallel by rotating one of them "
                         + "around a chosen pivot."), 
-				Shortcut.registerShortcut("tools:alignways", tr("Tool: {0}", tr("Align Ways")),
+                Shortcut.registerShortcut("tools:alignways", tr("Tool: {0}", tr("Align Ways")),
                                 KeyEvent.VK_SPACE, Shortcut.SHIFT)
-				, true);
+                , true);
         setEnabled(false);
     }
Index: applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysAlgnSegment.java
===================================================================
--- applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysAlgnSegment.java	(revision 30344)
+++ applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysAlgnSegment.java	(revision 30345)
@@ -64,7 +64,4 @@
     }
 
-    /* (non-Javadoc)
-     * @see com.tilusnet.josm.plugins.alignways.AlignWaysSegment#setSegmentEndpoints(org.openstreetmap.josm.data.osm.WaySegment)
-     */
     @Override
     void setSegmentEndpoints(WaySegment segment) {
@@ -75,5 +72,4 @@
             adjWaySegs.put(nA, new ArrayList<WaySegment>(determineAdjacentWaysegments(nA)));
         }
-
     }
 
@@ -223,12 +219,4 @@
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * com.tilusnet.josm.plugins.alignways.AlignWaysRefSegment#paint(java
-     * .awt.Graphics2D, org.openstreetmap.josm.gui.MapView,
-     * org.openstreetmap.josm.data.Bounds)
-     */
     @Override
     public void paint(Graphics2D g, MapView mv, Bounds bbox) {
@@ -248,5 +236,4 @@
         // Highlight active pivot
         highlightPivot(g, mv, getPivotCoord(currPivot));
-
     }
 
Index: applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepAngles.java
===================================================================
--- applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepAngles.java	(revision 30344)
+++ applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepAngles.java	(revision 30345)
@@ -55,6 +55,6 @@
 
         if (endpoint.getEastNorth().equals(pivot)) {
-        	// endpoint is pivot: the coordinates won't change
-        	return;
+            // endpoint is pivot: the coordinates won't change
+            return;
         }
         
@@ -64,36 +64,36 @@
             //  - the alignee following the keep length rule
             //  - the adjacent way segment
-        	
-        	Node adjOther1 = getNonEqualNode(alws.get(0), endpoint);
-        	EastNorth enAdjOther1 = adjOther1.getEastNorth();
-        	Node adjOther2 = null;
-        	EastNorth enAdjOther2 = null;
+            
+            Node adjOther1 = getNonEqualNode(alws.get(0), endpoint);
+            EastNorth enAdjOther1 = adjOther1.getEastNorth();
+            Node adjOther2 = null;
+            EastNorth enAdjOther2 = null;
 
             if (alws.size() == 2) {
-            	adjOther2 = getNonEqualNode(alws.get(1), endpoint);
-            	enAdjOther2 = adjOther2.getEastNorth();
-            	
-            	// In order have a chance to align, (enAdjOther1, enAdjOther2 and endpoint) must be collinear
-            	ArrayList<EastNorth> enAdjPts = new ArrayList<EastNorth>(3);
-            	enAdjPts.add(enAdjOther1);
-            	enAdjPts.add(endpoint.getEastNorth());
-            	enAdjPts.add(enAdjOther2);
-            	if (!isEnSetCollinear(enAdjPts)) {
-            		// Not collinear, no point to proceed
+                adjOther2 = getNonEqualNode(alws.get(1), endpoint);
+                enAdjOther2 = adjOther2.getEastNorth();
+                
+                // In order have a chance to align, (enAdjOther1, enAdjOther2 and endpoint) must be collinear
+                ArrayList<EastNorth> enAdjPts = new ArrayList<EastNorth>(3);
+                enAdjPts.add(enAdjOther1);
+                enAdjPts.add(endpoint.getEastNorth());
+                enAdjPts.add(enAdjOther2);
+                if (!isEnSetCollinear(enAdjPts)) {
+                    // Not collinear, no point to proceed
                     alignableStatKeepAngles = AlignableStatus.ALGN_INV_ANGLE_PRESERVING_CONFLICT;
                     return;
-            	}
-            	
+                }
+                
             }
 
             // Update the calculated node for angle preserving alignment
             AlignWaysGeomPoint isectPnt = alignedLineKeepLength.getIntersection(new AlignWaysGeomLine(enAdjOther1.getX(), enAdjOther1.getY(), 
-            																						  endpoint.getEastNorth().getX(), endpoint.getEastNorth().getY()));
+                                                                                                      endpoint.getEastNorth().getX(), endpoint.getEastNorth().getY()));
             EastNorth enIsectPt = null;
             // If the intersection is null, the adjacent and the alignee are parallel already:
             // there's no need to update this node
             if (isectPnt != null) {
-            	enIsectPt = new EastNorth(isectPnt.getX(), isectPnt.getY());
-            	// Don't "record" it yet as it may not be valid
+                enIsectPt = new EastNorth(isectPnt.getX(), isectPnt.getY());
+                // Don't "record" it yet as it may not be valid
             } else if (alignedLineKeepLength.getIntersectionStatus() == IntersectionStatus.LINES_PARALLEL) {
                 alignableStatKeepAngles = AlignableStatus.ALGN_INV_ANGLE_PRESERVING_CONFLICT;
@@ -107,50 +107,50 @@
             // TODO - find a solution
             if (alws.size() == 2 && enIsectPt != null) {
-            	int middlePtIdx = AlignWaysGeomPoint.getMiddleOf3(
-            			new AlignWaysGeomPoint(enIsectPt), 
-            			new AlignWaysGeomPoint(enAdjOther1), 
-            			new AlignWaysGeomPoint(enAdjOther2));
-            	if (middlePtIdx != 0) {
-            		EastNorth middlePt = null;
-            		switch(middlePtIdx) {
-            			case 1:
-            				middlePt = enIsectPt;
-            				break;
-            			case 2:
-            				middlePt = enAdjOther1;
-            				break;
-            			case 3:
-            				middlePt = enAdjOther2;
-            				break;
-            		}
-	            	if (middlePt != null) {
-	            		double eps = 1E-6;
-	                	if (!middlePt.equalsEpsilon(enIsectPt, eps)) {
-	                		// Intersection point didn't fall between the two adjacent points; not allowed
-	                        alignableStatKeepAngles = AlignableStatus.ALGN_INV_XPOINT_FALLSOUT;
-	                        return;
-	                		
-	                        /*
-	                		if (middlePt.equalsEpsilon(enAdjOther1, eps)) {
-	                			// Delete adjOther1
-	                			// adjOther1.setDeleted(true);
-	                		} else
-	                			if (true);
-	                			// Delete adjOther2
-	                			// adjOther2.setDeleted(true);
-                			 */
-	                	}
-	            	}
-            	}
+                int middlePtIdx = AlignWaysGeomPoint.getMiddleOf3(
+                        new AlignWaysGeomPoint(enIsectPt), 
+                        new AlignWaysGeomPoint(enAdjOther1), 
+                        new AlignWaysGeomPoint(enAdjOther2));
+                if (middlePtIdx != 0) {
+                    EastNorth middlePt = null;
+                    switch(middlePtIdx) {
+                        case 1:
+                            middlePt = enIsectPt;
+                            break;
+                        case 2:
+                            middlePt = enAdjOther1;
+                            break;
+                        case 3:
+                            middlePt = enAdjOther2;
+                            break;
+                    }
+                    if (middlePt != null) {
+                        double eps = 1E-6;
+                        if (!middlePt.equalsEpsilon(enIsectPt, eps)) {
+                            // Intersection point didn't fall between the two adjacent points; not allowed
+                            alignableStatKeepAngles = AlignableStatus.ALGN_INV_XPOINT_FALLSOUT;
+                            return;
+                            
+                            /*
+                            if (middlePt.equalsEpsilon(enAdjOther1, eps)) {
+                                // Delete adjOther1
+                                // adjOther1.setDeleted(true);
+                            } else
+                                if (true);
+                                // Delete adjOther2
+                                // adjOther2.setDeleted(true);
+                             */
+                        }
+                    }
+                }
             }
             
             if (isectPnt != null) {
                 // Angle preserving alignment passed all verification tests: record it.
-            	calculatedNodes.put(endpoint, enIsectPt);
+                calculatedNodes.put(endpoint, enIsectPt);
             }
             
             
         } else {
-        	// angle preserving alignment not possible
+            // angle preserving alignment not possible
             alignableStatKeepAngles = AlignableStatus.ALGN_INV_TOOMANY_CONNECTED_WS;
         }
@@ -160,26 +160,26 @@
 
     private boolean isEnSetCollinear(ArrayList<EastNorth> enAdjPts) {
-    	ArrayList<AlignWaysGeomPoint> awAdjPts = new ArrayList<AlignWaysGeomPoint>();
-    	
-    	for (EastNorth en : enAdjPts) {
-    		AlignWaysGeomPoint pt = new AlignWaysGeomPoint(en.getX(), en.getY());
-    		awAdjPts.add(pt);
-    	}
-    	
-		return AlignWaysGeomPoint.isSetCollinear(awAdjPts);
-	}
-
-
-	private Node getNonEqualNode(WaySegment waySegment, Node endpoint) {
-    	if (waySegment.getFirstNode().equals(endpoint)) {
-    		return waySegment.getSecondNode();
-    	} else if (waySegment.getSecondNode().equals(endpoint)) {
-    		return waySegment.getFirstNode();
-    	} else
-    		return null;
-	}
-
-
-	/**
+        ArrayList<AlignWaysGeomPoint> awAdjPts = new ArrayList<AlignWaysGeomPoint>();
+        
+        for (EastNorth en : enAdjPts) {
+            AlignWaysGeomPoint pt = new AlignWaysGeomPoint(en.getX(), en.getY());
+            awAdjPts.add(pt);
+        }
+        
+        return AlignWaysGeomPoint.isSetCollinear(awAdjPts);
+    }
+
+
+    private Node getNonEqualNode(WaySegment waySegment, Node endpoint) {
+        if (waySegment.getFirstNode().equals(endpoint)) {
+            return waySegment.getSecondNode();
+        } else if (waySegment.getSecondNode().equals(endpoint)) {
+            return waySegment.getFirstNode();
+        } else
+            return null;
+    }
+
+
+    /**
      * Reports invalid alignable statuses on screen in dialog boxes.
      * 
Index: applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepLength.java
===================================================================
--- applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepLength.java	(revision 30344)
+++ applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysCmdKeepLength.java	(revision 30345)
@@ -197,11 +197,4 @@
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.openstreetmap.josm.command.Command#fillModifiedData(java.util.Collection
-     * , java.util.Collection, java.util.Collection)
-     */
     @Override
     public void fillModifiedData(Collection<OsmPrimitive> modified,
@@ -212,9 +205,4 @@
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.openstreetmap.josm.command.Command#executeCommand()
-     */
     @Override
     public boolean executeCommand() {
@@ -223,9 +211,4 @@
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.openstreetmap.josm.command.Command#undoCommand()
-     */
     @Override
     public void undoCommand() {
Index: applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysDialog.java
===================================================================
--- applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysDialog.java	(revision 30344)
+++ applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysDialog.java	(revision 30345)
@@ -74,8 +74,8 @@
         modesPanel.setLayout(new BoxLayout(modesPanel, BoxLayout.PAGE_AXIS));
         /*
-		modesPanel.setBorder(BorderFactory.createCompoundBorder(
-				BorderFactory.createEmptyBorder(10, 10, 10, 10),
-				BorderFactory.createTitledBorder(tr("Align with:")))
-				);
+        modesPanel.setBorder(BorderFactory.createCompoundBorder(
+                BorderFactory.createEmptyBorder(10, 10, 10, 10),
+                BorderFactory.createTitledBorder(tr("Align with:")))
+                );
          */
         modesPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
Index: applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysMode.java
===================================================================
--- applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysMode.java	(revision 30344)
+++ applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysMode.java	(revision 30345)
@@ -228,7 +228,4 @@
     }
 
-    /* (non-Javadoc)
-     * @see org.openstreetmap.josm.actions.mapmode.MapMode#layerIsSupported(org.openstreetmap.josm.gui.layer.Layer)
-     */
     @Override
     public boolean layerIsSupported(Layer l) {
Index: applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysSegment.java
===================================================================
--- applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysSegment.java	(revision 30344)
+++ applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysSegment.java	(revision 30345)
@@ -27,118 +27,108 @@
 public class AlignWaysSegment implements MapViewPaintable {
 
-	protected WaySegment segment;
-	protected MapView mapview;
-	protected Color segmentColor = Color.WHITE;
-	protected Collection<Node> segmentEndPoints;
+    protected WaySegment segment;
+    protected MapView mapview;
+    protected Color segmentColor = Color.WHITE;
+    protected Collection<Node> segmentEndPoints;
 
-	public AlignWaysSegment(MapView mapview, Point p) throws IllegalArgumentException {
-		if (mapview == null)
-			throw new IllegalArgumentException(tr(
-					"Parameter ''{0}'' must not be null", "mapview"));
-		if (p == null)
-			throw new IllegalArgumentException(tr(
-					"Parameter ''{0}'' must not be null", "p"));
+    public AlignWaysSegment(MapView mapview, Point p) throws IllegalArgumentException {
+        if (mapview == null)
+            throw new IllegalArgumentException(tr(
+                    "Parameter ''{0}'' must not be null", "mapview"));
+        if (p == null)
+            throw new IllegalArgumentException(tr(
+                    "Parameter ''{0}'' must not be null", "p"));
 
-		this.mapview = mapview;
-	}
+        this.mapview = mapview;
+    }
 
-	void setSegment(WaySegment segment) {
-		this.segment = segment;
-		if (segment != null) {
-			setSegmentEndpoints(segment);
-			mapview.addTemporaryLayer(this);
-		}
-	}
+    void setSegment(WaySegment segment) {
+        this.segment = segment;
+        if (segment != null) {
+            setSegmentEndpoints(segment);
+            mapview.addTemporaryLayer(this);
+        }
+    }
 
 
-	void setSegmentEndpoints(WaySegment segment) {
-		if (segment != null) {
-			Node node1 = segment.way.getNode(segment.lowerIndex);
-			Node node2 = segment.way.getNode(segment.lowerIndex + 1);
+    void setSegmentEndpoints(WaySegment segment) {
+        if (segment != null) {
+            Node node1 = segment.way.getNode(segment.lowerIndex);
+            Node node2 = segment.way.getNode(segment.lowerIndex + 1);
 
-			segmentEndPoints = new HashSet<Node>();
-			segmentEndPoints.add(node1);
-			segmentEndPoints.add(node2);
+            segmentEndPoints = new HashSet<Node>();
+            segmentEndPoints.add(node1);
+            segmentEndPoints.add(node2);
 
-		}
-	}
+        }
+    }
 
-	protected WaySegment getNearestWaySegment(Point p) {
+    protected WaySegment getNearestWaySegment(Point p) {
 
-		return mapview.getNearestWaySegment(p, OsmPrimitive.isUsablePredicate);
+        return mapview.getNearestWaySegment(p, OsmPrimitive.isUsablePredicate);
 
-	}
+    }
 
-	public void destroy() {
-		if (segment != null) {
-			mapview.removeTemporaryLayer(this);
-		}
-	}
+    public void destroy() {
+        if (segment != null) {
+            mapview.removeTemporaryLayer(this);
+        }
+    }
 
-	public WaySegment getSegment() {
-		return segment;
-	}
+    public WaySegment getSegment() {
+        return segment;
+    }
 
-	public Collection<Node> getSegmentEndPoints() {
-		return segmentEndPoints;
-	}
+    public Collection<Node> getSegmentEndPoints() {
+        return segmentEndPoints;
+    }
 
-	@Override
-	public void paint(Graphics2D g, MapView mv, Bounds bbox) {
-		highlightSegment(segmentColor, g, mv);
-	}
+    @Override
+    public void paint(Graphics2D g, MapView mv, Bounds bbox) {
+        highlightSegment(segmentColor, g, mv);
+    }
 
-	protected void highlightSegment(Color c, Graphics2D g, MapView mv) {
+    protected void highlightSegment(Color c, Graphics2D g, MapView mv) {
 
-		g.setColor(c);
-		g.setStroke(new BasicStroke(6, BasicStroke.CAP_ROUND,
-				BasicStroke.JOIN_ROUND));
-		drawSegment(g, mv);
+        g.setColor(c);
+        g.setStroke(new BasicStroke(6, BasicStroke.CAP_ROUND,
+                BasicStroke.JOIN_ROUND));
+        drawSegment(g, mv);
 
-	}
+    }
 
-	protected void drawSegment(Graphics2D g, MapView mv) {
-		Node n1 = segment.way.getNode(segment.lowerIndex);
-		Node n2 = segment.way.getNode(segment.lowerIndex + 1);
+    protected void drawSegment(Graphics2D g, MapView mv) {
+        Node n1 = segment.way.getNode(segment.lowerIndex);
+        Node n2 = segment.way.getNode(segment.lowerIndex + 1);
 
-		Line2D newline = new Line2D.Double(mv.getPoint(n1), mv.getPoint(n2));
-		g.draw(newline);
-	}
+        Line2D newline = new Line2D.Double(mv.getPoint(n1), mv.getPoint(n2));
+        g.draw(newline);
+    }
 
-	/*
-	 * (non-Javadoc)
-	 * 
-	 * @see java.lang.Object#hashCode()
-	 */
-	 @Override
-	 public int hashCode() {
-		final int prime = 31;
-		int result = 1;
-		result = prime * result + ((segment == null) ? 0 : segment.hashCode());
-		result = prime * result
-				+ ((segmentColor == null) ? 0 : segmentColor.hashCode());
-		return result;
-	 }
+     @Override
+     public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((segment == null) ? 0 : segment.hashCode());
+        result = prime * result
+                + ((segmentColor == null) ? 0 : segmentColor.hashCode());
+        return result;
+     }
 
-	 /*
-	  * (non-Javadoc)
-	  * 
-	  * @see java.lang.Object#equals(java.lang.Object)
-	  */
-	 @Override
-	 public boolean equals(Object obj) {
-		 if (this == obj)
-			 return true;
-		 if (obj == null)
-			 return false;
-		 if (!(obj instanceof AlignWaysSegment))
-			 return false;
-		 AlignWaysSegment other = (AlignWaysSegment) obj;
-		 if (segment == null) {
-			 if (other.segment != null)
-				 return false;
-		 } else if (!segment.equals(other.segment))
-			 return false;
-		 /* Segment colour is ignored in comparison
+     @Override
+     public boolean equals(Object obj) {
+         if (this == obj)
+             return true;
+         if (obj == null)
+             return false;
+         if (!(obj instanceof AlignWaysSegment))
+             return false;
+         AlignWaysSegment other = (AlignWaysSegment) obj;
+         if (segment == null) {
+             if (other.segment != null)
+                 return false;
+         } else if (!segment.equals(other.segment))
+             return false;
+         /* Segment colour is ignored in comparison
         if (segmentColor == null) {
             if (other.segmentColor != null)
@@ -146,6 +136,6 @@
         } else if (!segmentColor.equals(other.segmentColor))
             return false;
-		  */
-		 return true;
-	 }
+          */
+         return true;
+     }
 }
Index: applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysWhatsNewPanel.java
===================================================================
--- applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysWhatsNewPanel.java	(revision 30344)
+++ applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/AlignWaysWhatsNewPanel.java	(revision 30345)
@@ -47,12 +47,12 @@
 
         lblWhatsNew.setText("<html><div style=\"font-family: sans-serif; font-weight: bold; font-style: italic;\"><span style=\"font-size: large;\"><span style=\"font-size: x-large;\">" 
-        				    + tr("What''s new...") 
-        				    + "</span></div></html>");
+                            + tr("What''s new...") 
+                            + "</span></div></html>");
 
         icnLogo.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/wndialog/alignways64.png"))); // NOI18N
 
         newItem1.setText("<html><div style=\"font-family: sans-serif;\"><ul style=\"margin-left: 20px;\"><li>"
-        				 + tr("Added <b>angle preserving</b> aligning mode") 
-        				 + "</li></ul></div></html>");
+                         + tr("Added <b>angle preserving</b> aligning mode") 
+                         + "</li></ul></div></html>");
 
         btnHelpItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/wndialog/extlink10.png"))); // NOI18N
@@ -73,6 +73,6 @@
 
         newItem2.setText("<html><div style=\"font-family: sans-serif;\"><ul style=\"margin-left: 20px;\"><li>"
-        				 + tr("Various improvements and bugfixes")
-        				 + "</li></ul></div></html>");
+                         + tr("Various improvements and bugfixes")
+                         + "</li></ul></div></html>");
 
         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
@@ -115,7 +115,7 @@
     }// </editor-fold>
 
-	private void btnHelpItem1ActionPerformed(java.awt.event.ActionEvent evt) {
-	   openURI();
-	}
+    private void btnHelpItem1ActionPerformed(java.awt.event.ActionEvent evt) {
+       openURI();
+    }
 
     // Variables declaration - do not modify
Index: applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/geometry/AlignWaysGeomLine.java
===================================================================
--- applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/geometry/AlignWaysGeomLine.java	(revision 30344)
+++ applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/geometry/AlignWaysGeomLine.java	(revision 30345)
@@ -8,5 +8,5 @@
 public class AlignWaysGeomLine {
 
-	double coef_a, coef_b, coef_c;
+    double coef_a, coef_b, coef_c;
 
     public enum IntersectionStatus {
@@ -76,8 +76,8 @@
 
     public AlignWaysGeomLine(AlignWaysGeomPoint awPt1, AlignWaysGeomPoint awPt2) {
-    	this(awPt1.getX(), awPt1.getY(), awPt2.getX(), awPt2.getY());
-	}
-
-	/**
+        this(awPt1.getX(), awPt1.getY(), awPt2.getX(), awPt2.getY());
+    }
+
+    /**
      * Returns the intersection point of the line with another line.
      * If the lines are parallel or overlap, returns null.
@@ -95,5 +95,5 @@
 
         // See: http://www.mathwizz.com/algebra/help/help21.htm
-        //  and http://en.wikipedia.org/wiki/Cramers_rule
+        //  and https://en.wikipedia.org/wiki/Cramer%27s_rule
 
 
@@ -184,23 +184,23 @@
     }
 
-	public boolean isPointOnLine(AlignWaysGeomPoint awPt) {
-		// Method:
-		// 1. create a new line from awPt and one point of 'this'
-		// 2. check getIntersectionStatus of the two lines
-		// 3. if status is LINES_OVERLAP, the point os one the line, otherwise not
-		
-		// Need an arbitrary point on this line; let it be (x, y)
-		Double x = 0.0;
-		Double y = getYonLine(x);
-		if (y.isNaN()) y = 0.0;
-		
-		AlignWaysGeomLine line2 = new AlignWaysGeomLine(awPt, new AlignWaysGeomPoint(x, y));
-		getIntersection(line2);
-		if (getIntersectionStatus() == IntersectionStatus.LINES_OVERLAP)
-			return true;
-		else
-			return false;
-		
-	}
+    public boolean isPointOnLine(AlignWaysGeomPoint awPt) {
+        // Method:
+        // 1. create a new line from awPt and one point of 'this'
+        // 2. check getIntersectionStatus of the two lines
+        // 3. if status is LINES_OVERLAP, the point os one the line, otherwise not
+        
+        // Need an arbitrary point on this line; let it be (x, y)
+        Double x = 0.0;
+        Double y = getYonLine(x);
+        if (y.isNaN()) y = 0.0;
+        
+        AlignWaysGeomLine line2 = new AlignWaysGeomLine(awPt, new AlignWaysGeomPoint(x, y));
+        getIntersection(line2);
+        if (getIntersectionStatus() == IntersectionStatus.LINES_OVERLAP)
+            return true;
+        else
+            return false;
+        
+    }
 
 }
Index: applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/geometry/AlignWaysGeomPoint.java
===================================================================
--- applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/geometry/AlignWaysGeomPoint.java	(revision 30344)
+++ applications/editors/josm/plugins/alignways/src/com/tilusnet/josm/plugins/alignways/geometry/AlignWaysGeomPoint.java	(revision 30345)
@@ -17,9 +17,9 @@
 
     public AlignWaysGeomPoint(EastNorth eastNorth) {
-    	this.x = eastNorth.getX();
-    	this.y = eastNorth.getY();
-	}
+        this.x = eastNorth.getX();
+        this.y = eastNorth.getY();
+    }
 
-	public double getX() {
+    public double getX() {
         return x;
     }
@@ -37,81 +37,81 @@
     }
 
-	public static boolean isSetCollinear(ArrayList<AlignWaysGeomPoint> awPts) {
-		if (awPts.size() <= 1)
-			return false;
-		
-		if (awPts.size() == 2)
-			return true;
-		else {
-			// at least 3 points
-			// First create a line of the first two points in the set
-			AlignWaysGeomLine line = new AlignWaysGeomLine(awPts.get(0), awPts.get(1));
-			// ...then check the subsequent points whether they are on the line
-			for (int i = 2; i < awPts.size(); i++) {
-				if (!line.isPointOnLine(awPts.get(i))) {
-					return false;
-				}
-			}
-			return true;
-		}
-	}
+    public static boolean isSetCollinear(ArrayList<AlignWaysGeomPoint> awPts) {
+        if (awPts.size() <= 1)
+            return false;
+        
+        if (awPts.size() == 2)
+            return true;
+        else {
+            // at least 3 points
+            // First create a line of the first two points in the set
+            AlignWaysGeomLine line = new AlignWaysGeomLine(awPts.get(0), awPts.get(1));
+            // ...then check the subsequent points whether they are on the line
+            for (int i = 2; i < awPts.size(); i++) {
+                if (!line.isPointOnLine(awPts.get(i))) {
+                    return false;
+                }
+            }
+            return true;
+        }
+    }
 
-	/**
-	 * Determines which (EastNorth) point falls between the other two.
-	 * Ideally to be used with collinear points.
-	 * 
-	 * @return 1, 2 or 3 for pt1, pt2 and pt3, respectively. 
-	 * 0 if middle value cannot be determined (i.e. some values are equal). 
-	 */
-	public static int getMiddleOf3(
-			AlignWaysGeomPoint pt1, 
-			AlignWaysGeomPoint pt2, 
-			AlignWaysGeomPoint pt3) {
-		
-		int midPtXIdx = getMiddleOf3(pt1.x, pt2.x, pt3.x);
-		int midPtYIdx = getMiddleOf3(pt1.y, pt2.y, pt3.y);
-		
-		if ((midPtXIdx == 0) && (midPtYIdx == 0))
-			// All 3 points overlap: 
-			// Design decision: return the middle point (could be any other or none)
-			return 2;
-		
-		if (midPtXIdx == 0) return midPtYIdx; 
-		if (midPtYIdx == 0) return midPtXIdx;
-		
-		// Both x and y middle points could be determined;
-		// their indexes must coincide
-		if (midPtXIdx == midPtYIdx)
-			// Success
-			return midPtXIdx; // (or midPtYIdx)
-		else
-			// Fail
-			return 0;
-		
-	}
+    /**
+     * Determines which (EastNorth) point falls between the other two.
+     * Ideally to be used with collinear points.
+     * 
+     * @return 1, 2 or 3 for pt1, pt2 and pt3, respectively. 
+     * 0 if middle value cannot be determined (i.e. some values are equal). 
+     */
+    public static int getMiddleOf3(
+            AlignWaysGeomPoint pt1, 
+            AlignWaysGeomPoint pt2, 
+            AlignWaysGeomPoint pt3) {
+        
+        int midPtXIdx = getMiddleOf3(pt1.x, pt2.x, pt3.x);
+        int midPtYIdx = getMiddleOf3(pt1.y, pt2.y, pt3.y);
+        
+        if ((midPtXIdx == 0) && (midPtYIdx == 0))
+            // All 3 points overlap: 
+            // Design decision: return the middle point (could be any other or none)
+            return 2;
+        
+        if (midPtXIdx == 0) return midPtYIdx; 
+        if (midPtYIdx == 0) return midPtXIdx;
+        
+        // Both x and y middle points could be determined;
+        // their indexes must coincide
+        if (midPtXIdx == midPtYIdx)
+            // Success
+            return midPtXIdx; // (or midPtYIdx)
+        else
+            // Fail
+            return 0;
+        
+    }
 
-	/**
-	 * Determine which value, d1, d2 or d3 falls in the middle of the other two.
-	 * @return 1, 2 or 3 for d1, d2 and d3, respectively. 
-	 * 0 if middle value cannot be determined (i.e. some values are equal). 
-	 */
-	private static int getMiddleOf3(double d1, double d2, double d3) {
-		
-		Double[] dValues = {d1, d2, d3};
-		ArrayList<Double> alValues = new ArrayList<Double>(Arrays.asList(dValues));
-		Collections.sort(alValues);
-		
-		if ((Math.abs(alValues.get(1) - alValues.get(0)) < 0.01) ||
-		    (Math.abs(alValues.get(1) - alValues.get(2)) < 0.01))
-			// Cannot determine absolute middle value
-			return 0;
-		else {
-			if (Math.abs(alValues.get(1) - d1) < 0.01) return 1;
-			if (Math.abs(alValues.get(1) - d2) < 0.01) return 2;
-			if (Math.abs(alValues.get(1) - d3) < 0.01) return 3;
-		}
-		
-		// Should never happen
-		return 0;
-	}
+    /**
+     * Determine which value, d1, d2 or d3 falls in the middle of the other two.
+     * @return 1, 2 or 3 for d1, d2 and d3, respectively. 
+     * 0 if middle value cannot be determined (i.e. some values are equal). 
+     */
+    private static int getMiddleOf3(double d1, double d2, double d3) {
+        
+        Double[] dValues = {d1, d2, d3};
+        ArrayList<Double> alValues = new ArrayList<Double>(Arrays.asList(dValues));
+        Collections.sort(alValues);
+        
+        if ((Math.abs(alValues.get(1) - alValues.get(0)) < 0.01) ||
+            (Math.abs(alValues.get(1) - alValues.get(2)) < 0.01))
+            // Cannot determine absolute middle value
+            return 0;
+        else {
+            if (Math.abs(alValues.get(1) - d1) < 0.01) return 1;
+            if (Math.abs(alValues.get(1) - d2) < 0.01) return 2;
+            if (Math.abs(alValues.get(1) - d3) < 0.01) return 3;
+        }
+        
+        // Should never happen
+        return 0;
+    }
 }
