added algorithm for automatically removing edges which are too close to nodes or other edges.