Added class CubicSpline to split code that works with splines