Improve error checking for failed promise.
Prepare index.html to support a live, working example.
Add README.