PrepareTask complete tentatively, not tested.