Made a bunch of style changes and fixed the error handling for the api requests.  Also improved how errors are dealt with by the javascript api.
Fixed issue with using javascript api and 'all' request.