Added missing import
Factored out token generation to be reusable
Added integration tests for async calls to master_call()