     }
     
     var message: String {
-        let filteredHeaders = headers.filter { header -> Bool in
-            return header.isMessage
-        }
-        
-        if filteredHeaders.isEmpty {
+        if let header = headers.filter({ $0.isMessage }).first {
+            return header.value
+        } else {
             return ""
+        }
+    }
+    
+    var destination: String {
+        if let header = headers.filter({ $0.isDestination }).first {
+            return header.value
         } else {
-            return filteredHeaders.first!.value
-        }
-    }
-    
-    var destination: String {
-        let filteredHeaders = headers.filter { header -> Bool in
-            return header.isDestination
-        }
-        
-        if filteredHeaders.isEmpty {
             return ""
-        } else {
-            return filteredHeaders.first!.value
         }
     }
     
     // MARK: - Private Properties
-    private let lineFeed = "\u{0A}"
-    private let nullChar = "\u{00}"
+    private let lineFeed = "\n"
+    private let nullChar = "\0"
     private(set) var type: StompResponseType?
     private(set) var command: StompCommand
     private(set) var headers: Set<StompHeader>

        return key.hashValue
    }
    
    // MARK: - Public Methods
    static func generateHeader(key: String, value: String) -> StompHeader? {
        switch key {
        case "version":
            return .Version(version: value)
        case "subscription":
            return .Subscription(subId: value)
        case "message-id":
            return .MessageId(id: value)
        case "content-length":
            return .ContentLength(length: value)
        case "message":
            return .Message(message: value)
        case "destination":
            return .Destination(path: value)
        case "heart-beat":
            return .HeartBeat(value: value)
        default:
            return nil
        }
    }
    

    
    // MARK: - Public Methods
    static func generateFrame(text: String) -> StompFrame {
        let type = StompResponseType(rawValue: String(text.characters.first!))
        do {
            let (command, headers, body) = try String(text.characters.dropFirst()).parseJSONText()
            return StompFrame(type: type, command: command, headers: headers, body: body)
