Improved Testing and removed storage of filename from trajectory