         guard let session = _httpSession else {
             return
         }
-
+        
         _httpSession = nil
-
+        
         session.invalidate()
     }
-
-
+    
+    
+    private func loadIncidentTypes() {
+        let typesURL = "\(self.url)incident_types/"
+
+        func onResponse(json: AnyObject?) {
+            logInfo("Loaded incident types")
+
+            removeConnectionForLoadingGroup(
+                group: IMSLoadingGroup.IncidentTypes,
+                id: IMSConnectionID.IncidentTypes
+            )
+
+            guard let json = json else {
+                logError("Incident types request retrieved no JSON data")
+                return
+            }
+
+            guard let incidentTypes = json as? Array<String> else {
+                logError("Incident Types JSON is non-conforming: \(json)")
+                return
+            }
+
+            _incidentTypes = Set(incidentTypes)
+        }
+
+        func onError(message: String) {
+            logError("Error while attempting incident types request: \(message)")
+            resetConnection()
+        }
+
+        logInfo("Sending incident types request to: \(typesURL)")
+
+        guard let connection = self.httpSession.sendJSON(
+            url: typesURL,
+            json: nil,
+            responseHandler: onResponse,
+            errorHandler: onError
+            ) else {
+                logError("Unable to create incident types connection?")
+                resetConnection()
+                return
+        }
+
+        addConnectionForLoadingGroup(
+            group: IMSLoadingGroup.IncidentTypes,
+            id: IMSConnectionID.IncidentTypes,
+            connection: connection
+        )
+    }
+    
+    
 //    private func connectionsForLoadingGroup(
 //        group: IMSLoadingGroup
 //    ) throws -> [IMSConnectionID: HTTPConnection] {

            json: nil,
            responseHandler: onResponse,
            errorHandler: onError
        ) else {
            logError("Unable to create ping connection?")
            resetConnection()
            return
        }

        loadingState = IMSLoadingState.Trying(connection)

        group group: IMSLoadingGroup,
        id: IMSConnectionID,
        connection: HTTPConnection
        ) {
            guard case .Loading(var loading) = loadingState else {
                logError("Incorrect loading state.")
                return
            }

            if loading[group] == nil {
                loading[group] = [:]
            }

            loading[group]![id] = connection

            loadingState = IMSLoadingState.Loading(loading)
    }


    private func removeConnectionForLoadingGroup(
        group group: IMSLoadingGroup,
        id: IMSConnectionID
        ) {
            guard case .Loading(var loading) = loadingState else {
                logError("Incorrect loading state.")
                return
            }

            if loading[group] == nil {
                logError("No such connection.")
                return
            }

            if loading[group]!.removeValueForKey(id) == nil {
                logError("No such connection.")
                return
            }

            if loading[group]!.count == 0 {
                // Nothing left for this group; remove the group
                loading.removeValueForKey(group)

                if loading.count == 0 {
                    // No groups loading data; switch to idle state
                    loadingState = IMSLoadingState.Idle
                    return
                }
            }
            
            loadingState = IMSLoadingState.Loading(loading)
    }
    
}


