Introduce templated Integrator, some modifications