Only manipulate the DOM once all promises have resolved