 
     // MARK: - Public
 
-    public static func elloRequest(token: ElloAPI, method: Moya.Method, success: ElloSuccessCompletion, failure: ElloFailureCompletion?) {
-        ElloProvider.sharedProvider.request(token, method: method, parameters: token.defaultParameters, completion: {
+    public static func elloRequest(target: ElloAPI, method: Moya.Method, success: ElloSuccessCompletion, failure: ElloFailureCompletion?) {
+        ElloProvider.sharedProvider.request(target, method: method, parameters: target.defaultParameters, completion: {
             (data, statusCode, response, error) in
-            ElloProvider.handleRequest(token, method: method, data: data, response: response as? NSHTTPURLResponse, statusCode: statusCode, success: success, failure: failure, isRetry: false, error: error)
+            ElloProvider.handleRequest(target, method: method, data: data, response: response as? NSHTTPURLResponse, statusCode: statusCode, success: success, failure: failure, isRetry: false, error: error)
         })
     }
 


    // MARK: - Private

    static private func handleRequest(token: ElloAPI, method: Moya.Method, data:NSData?, response: NSHTTPURLResponse?, var statusCode:Int?, success: ElloSuccessCompletion, failure: ElloFailureCompletion?, isRetry: Bool, error:NSError?) {
        if data != nil && statusCode != nil {
            switch statusCode! {
            case 200...299:
                ElloProvider.handleNetworkSuccess(data!, elloAPI: token, statusCode:statusCode, response: response, success: success, failure: failure)
            case 300...399:
                ElloProvider.handleNetworkSuccess(data!, elloAPI: token, statusCode:statusCode, response: response, success: success, failure: failure)
            case 401:
                if !isRetry {
                    let authService = AuthService()
                    authService.reAuthenticate({
                        // now retry the previous request that generated the original 401
                        ElloProvider.sharedProvider.request(token, method: method, parameters: token.defaultParameters, completion: { (data, statusCode, response, error) in
                            ElloProvider.handleRequest(token, method: method, data: data, response: response as? NSHTTPURLResponse, statusCode: statusCode, success: success, failure: failure, isRetry: true, error: error)
                        })
                    },
                    failure: { _ in

    public static var endpointsClosure = { (target: ElloAPI, method: Moya.Method, parameters: [String: AnyObject]) -> Endpoint<ElloAPI> in
        let sampleResponse = EndpointSampleResponse.Closure({ return EndpointSampleResponse.SuccessWithResponse(200, target.sampleData, target.sampleResponse) })

        let encoding: Moya.ParameterEncoding
        switch target {
        case .CreatePost, .CreateComment, .ProfileUpdate, .RePost, .FindFriends:
            encoding = Moya.ParameterEncoding.JSON
        default:
            encoding = Moya.ParameterEncoding.URL
        }

        var endpoint = Endpoint<ElloAPI>(URL: url(target), sampleResponse: sampleResponse, method: method, parameters: parameters, parameterEncoding: encoding)
        if target.requiresToken {
            endpoint = endpoint.endpointByAddingHTTPHeaderFields(["Authorization": AuthToken().tokenWithBearer ?? "", "Accept-Language": ""])
        }

        return endpoint
    }

    public static func DefaultProvider() -> MoyaProvider<ElloAPI> {
