Merge trajectories works for multiple datsets now.