Support for method chaining on PiecewiseCurve, and now seems to run error-free