Added a modified version of race.js to scratch/thomas/async.js to get a pattern working for asynchronous event handling