...this involves adding a Curve class, and significant refactoring to make this possible in a clean way.