constrained-b-spline: refactoring, cleaning.