Updated code gen for async