fix bug in edge deletion

  was leaving edges in some of their nodes
re-wrote merge-nodes
min-s-t-cut works and is tested