Convert to use promises.
IE8 support.