 
 import Foundation
 
+/// Swift struct wrapper for copyable object.
+internal protocol ReferenceConvertible {
+    
+    associatedtype Reference: CopyableReference
+    
+    var internalReference: CopyOnWrite<Reference> { get }
+    
+    init(_ internalReference: CopyOnWrite<Reference>)
+}
+
+/// A copyable object
 internal protocol CopyableReference: class {
     
     var copy: Self { get }
 }
 
 /// Encapsulates behavior surrounding value semantics and copy-on-write behavior
-/// Modified version of https://github.com/klundberg/CopyOnWrite
 internal struct CopyOnWrite <Reference: CopyableReference> {
     
     /// Needed for `isKnownUniquelyReferenced`

            // copy the reference if multiple structs are backed by the reference
            if isUniquelyReferenced == false {
                
                // make copy
                let copy = _reference.unbox.copy
                _reference = Box(copy)
            }

        }
    }
    
    /// Box object whose reference count is checked for uniqueness.
    @_versioned
    internal var _reference: Box
    
    /// Constructs the copy-on-write wrapper around the given reference.
    ///
    /// - Parameters:
    ///   - reference: The object that is to be given value semantics
    @inline(__always)
    init(_ reference: Reference) {
        self._reference = Box(reference)
