Tidy up of the asynchronous test code
tidy up and update to the run script