Refactored remote.JSON to support resource and service