Began adding code from spline tutorial.