Adding methods to Promise object, avoiding circular dependencies, adding polyfill