heavily refactored code, moved integrator code into dynamics model class