Moved number of samples to pass to integrator into a variable.