Update sendnode and sendedge

Now more generic