Switched to dynamic arrays, rewrote integrator, support for n-dimensional systems