Fixed bugs in drawXt and drawpath. Added functions to update the matrix of trajectories.