rewrote integrator. Removed queues. Direct function calls. SR needs testing