skip invalid intermediate nodes in path calculation, cleaned up some
tests, began fixing ring condition