Possible solution for faster trajectory reading.

This seems to solve the problem.  I'm sure there are other API refactorings that could achieve the same, but this one was the first that came to my mind.

I still haven't implemented the overlapping frame logic.