Refactor spline module using slices.