Added extend functionality.

This is an alternative approach to speeding up multiple trajectory loading.