Added spline functionality and a UI to visualize it