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