Added task and executeFactory procedure.