Modify spline code