Use ES6-style promises instead of CommonJS' defer()