             self.value = Data()
         }
         
-        self.signature = (data[data.count - 12], data[data.count - 11], data[data.count - 10], data[data.count - 9], data[data.count - 8], data[data.count - 7], data[data.count - 6], data[data.count - 5], data[data.count - 4], data[data.count - 3], data[data.count - 2], data[data.count - 1])
+        self.signature = (data[data.count - 12],
+                          data[data.count - 11],
+                          data[data.count - 10],
+                          data[data.count - 9],
+                          data[data.count - 8],
+                          data[data.count - 7],
+                          data[data.count - 6],
+                          data[data.count - 5],
+                          data[data.count - 4],
+                          data[data.count - 3],
+                          data[data.count - 2],
+                          data[data.count - 1])
     }
     
     public var data: Data {
         
-        let type = ATTSignedWriteCommand.self
-        
         let handleBytes = handle.littleEndian.bytes
         
-        return Data([type.attributeOpcode.rawValue, handleBytes.0, handleBytes.1])
+        return Data([ATTSignedWriteCommand.attributeOpcode.rawValue, handleBytes.0, handleBytes.1])
             + value
             + Data([signature.0, signature.1, signature.2, signature.3, signature.4, signature.5, signature.6, signature.7, signature.8, signature.9, signature.10, signature.11])
     }

    /// Authentication signature for the Attribute Upload, Attribute Handle and Attribute Value Parameters.
    public var signature: Signature
    
    public init(handle: UInt16, value: Data, signature: Signature) {
        
        self.handle = handle
        self.value = value
        self.signature = signature
    }
    
    public init?(data: Data) {
        
        let type = ATTSignedWriteCommand.self
        
        guard data.count >= type.length
            else { return nil }
        
        let attributeOpcodeByte = data[0]
        
        guard attributeOpcodeByte == type.attributeOpcode.rawValue
            else { return nil }
        
        self.handle = UInt16(littleEndian: UInt16(bytes: (data[1], data[2])))
        
        if data.count > type.length {
            
            self.value = Data(data[3 ..< data.count - 12])
            

    
    public static var attributeOpcode: ATT.Opcode { return .signedWriteCommand }
    
    /// The handle of the attribute to be set.
    public var handle: UInt16
    
