Added linking and teleport logic.