Fix bugs and finish adding DELETE and CANCEL buttons for idp_trajectories