Remove debug logging for Segment / Curve insertion, deletion and splitting.
Restructure code a bit.