Rewrote LineDissolve, faster and more correct.