cleaned up integrator, fixed strlen bug in main