Mind or the subtle body along with the causal body is what transmigrates on death and is the cause of rebirth. The agitations of the mind is because of desires, the root cause of which is avidya. Hence when avidya ends, agitations end, and the mind is rendered impotent, and when the mind is impotent it no longer transmigrates, hence this is Moksa. Please keep listening to the lectures and things will get clearer. These concepts are covered also in the Foundation and Advanced vedanta courses of CIF.