cos-46 updated delete to remove bl:ref and i# node if no other nodes use it, updated clostest path check