Refactor to client to use an execution context.