Upgrading to underscore version 1.5.0 in order to make use of a functional _.object() helper method.
Nearly final debugging and optimization.  Translated most of the spaghetti to more object-oriented design.  Still one more change left--tracking the minimum spanning tree as lists of edges used at each vertex rather than as a list of child vertex IDs so the recalculation of distances can be avoided.