Add promise.js to have cleaner promise code