Cleaning up code and documentation. Adding optional parameters to control the interpolation method, integration method and integration error tolerance.