neighbor works.

The loop was caused by a previous function renaming.
The definition of newDMap includes connectingEdges, which in turn
included newDMap, creating a loop.
Minor refactoring.