Further updating of trajectory.py