Refactor to client to use an execution context.
Merge pull request #1 from james-dibble/execution-context

Refactor to client to use an execution context.