     
     // MARK: - Error
     enum NodeError: Error {
-        case PreExistingValue// = "Node with value: already exists within BinarySearchTree!"
-        case InvalidNodeException// = "Node with value does not exist!"
-        case RootNilException //= "Root must be set before any other nodes are added!"
+        case PreExistingValue
+        case InvalidNodeException
+        case RootNilException
     }
     
     // MARK: - Private

        return node
    }
    
    public func values() -> [T] {
        return self.table
    }
    
    public func max() -> Node<T>? {
        return maximum(root!)!
    }
    
    public func min() -> Node<T>? {
        return minimum(root!)!
    }

        }
        if(indexNode?.value! == value){
            let parent: Node<T>? = indexNode?.parent!
            indexNode?.left?.parent = parent    
            indexNode?.right?.parent = parent
            let ix: Int = table.index(where: {$0 as! T == value})!
            table.remove(at: ix)
            return indexNode
        }
