Minimal ES6 / Promises/A+ implementation