Ensure library ajax failure uses the correct callback.
Improve documentation for JS.
Refactor out building of specific API URLs into their own functions.