Fixed all the issues for getting the type-erased trajectories working. Compiles successfully.