This could do with some love from async.js