Made integrator/rhs type-independent, work for comp, double, float