                         return
                     }
                 }
-                let userInfo = [
-                    NSLocalizedDescriptionKey : String("Operation was unsuccessful."),
-                    NSLocalizedFailureReasonErrorKey: String("Could not parse data to a valid NSDictionnary object"),
-                    NSLocalizedRecoverySuggestionErrorKey: String("Please ensure that the provided url is valid")
-                ]
-                completionHandler(streams: nil, error: NSError(domain: "HitboxAPI", code: 3, userInfo: userInfo))
+                completionHandler(streams: nil, error: .JSONError)
                 return
             }
             else {
-                let userInfo = [
-                    NSLocalizedDescriptionKey : String("Operation was unsuccessful."),
-                    NSLocalizedFailureReasonErrorKey: String("The operation returned an error : %@", response.result.error.debugDescription),
-                    NSLocalizedRecoverySuggestionErrorKey: String("Please ensure that the provided channel is valid")
-                ]
-                completionHandler(streams: nil, error: NSError(domain: "HitboxAPI", code: 1, userInfo: userInfo))
+                completionHandler(streams: nil, error: .URLError)
                 return
             }
         }
     }
     
-    static func getLiveStreams(offset: Int, limit: Int, completionHandler: (streams: [HitboxMedia]?, error: NSError?) -> ()) {
+    static func getLiveStreams(offset: Int, limit: Int, completionHandler: (streams: [HitboxMedia]?, error: HitboxError?) -> ()) {
         let urlString = "https://api.hitbox.tv/media/live/list"
         
         Alamofire.request(.GET, urlString, parameters:

                        return
                    }
                }
                let userInfo = [
                    NSLocalizedDescriptionKey : String("Operation was unsuccessful."),
                    NSLocalizedFailureReasonErrorKey: String("Could not parse data to a valid NSDictionnary object"),
                    NSLocalizedRecoverySuggestionErrorKey: String("Please ensure that the provided url is valid")
                ]
                completionHandler(streams: nil, error: NSError(domain: "HitboxAPI", code: 3, userInfo: userInfo))
                return
            }
            else {
                let userInfo = [
                    NSLocalizedDescriptionKey : String("Operation was unsuccessful."),
                    NSLocalizedFailureReasonErrorKey: String("The operation returned an error : %@", response.result.error.debugDescription),
                    NSLocalizedRecoverySuggestionErrorKey: String("Please ensure that the provided channel is valid")
                ]
                completionHandler(streams: nil, error: NSError(domain: "HitboxAPI", code: 1, userInfo: userInfo))
                return
            }
        }


class HitboxAPI {
    
    enum HitboxError: ErrorType {
        case URLError
        case JSONError
        case AuthError
        case NoAuthTokenError
        case OtherError
        
        var errorDescription: String {
            get {
                switch self {
                case .URLError:
                    return "There was an error with the request."
                case .JSONError:
                    return "There was an error parsing the JSON."
                case .AuthError:
                    return "The user is not authenticated."
                case .NoAuthTokenError:
                    return "There was no auth token provided in the response data."
                case .OtherError:
                    return "An unidentified error occured."
                }
            }
        }
        
        var recoverySuggestion: String {
            get {
                switch self {
                case .URLError:
                    return "Please make sure that the url is formatted correctly."
                case .JSONError:
                    return "Please check the request information and response."
                case .AuthError:
                    return "Please make sure to authenticate with Twitch before attempting to load this data."
                case .NoAuthTokenError:
                    return "Please check the server logs and response."
                case .OtherError:
                    return "Sorry, there's no provided solution for this error."
                }
            }
        }
    }
    
    static func getGames(offset: Int, limit: Int, completionHandler: (games: [HitboxGame]?, error: HitboxError?) -> ()) {
        let urlString = "https://api.hitbox.tv/games"
        
        Alamofire.request(.GET, urlString, parameters:
