Spline embedded in the code
fixed all the small bugs