Integration of a set of trajectories

Done, with a nested block as discussed.