Added getTrajectory and removed much of the old stuff.