Changes to use new json-rest-api (qs)