Finally got this working. I fixed a huge issue with summing the weights of cut edges.