Converted straight $http calls to a resource service.