Fixed bugs in the API resources that prevented JSONP and XML from working. Fixes #131