Move general functions to the Spline class
Add some documentation \o/