Remove unused function
Get rid of agent-conditional logic in ExpandPromiseAndDo