Cleaned up $resource resolve