Much fighting with edge cost lookup

I'm almost to the point of a functioning approach, but I'm going to need
to eventually move to something that doesn't take an eternity.
Might be properly accounting for edge weights

Also remove some debugging output