Added BezierCurve handling and tests + some cleaning