         return nodeLookup[query] != null;
     }
 
-    public function remove(element:*):Boolean
-    {
-        var node:Node = nodeLookup[element];
+    public function remove(member:*):Boolean
+    {
+        var node:Node = nodeLookup[member];
         if (node)
         {
             Node.unlink(node);
-            delete nodeLookup[element];
+            delete nodeLookup[member];
             _length--;
             return true;
         }

        return _back.prev.value;
    }

    public function pushFront(element:*):void
    {
        if (element == null)
        {
            throw new ArgumentError("DequeSet cannot contain null members");
        }
        var node:Node = takeNode(element);
        Node.insertAfter(_front, node);
    }

    public function pushBack(element:*):void
    {
        if (element == null)
        {
            throw new ArgumentError("DequeSet cannot contain null members");
        }
        var node:Node = takeNode(element);
        Node.insertBefore(_back, node);
    }


        }
    }

    public function insertAfter(newMember:*, referenceMember:*):void
    {
        checkRelativeArguments(newMember, referenceMember);
        var reference:Node = nodeLookup[referenceMember];
        var node:Node = takeNode(newMember);
        Node.insertAfter(reference, node);
    }

    public function insertBefore(newMember:*, referenceMember:*):void
    {
        checkRelativeArguments(newMember, referenceMember);
        var reference:Node = nodeLookup[referenceMember];
        var node:Node = takeNode(newMember);
        Node.insertBefore(reference, node);
    }

    // O(n) manipulations
    public function get(index:int):*
    {
        return getNodeAtIndex(index).value;
    }

    public function indexOf(query:*):int
    {
        var rover:Node = nodeLookup[query];
        var index:int = -1;
        if (rover)
        {
            while (rover !== _front)
            {
                rover = rover.prev;
                index++;
            }
        }
        return index;
    }

    public function removeAt(index:int):*
    {
        var memberToRemove:* = get(index);
        remove(memberToRemove);
        return memberToRemove;
    }

    public function insertAt(newMember:*, index:int):void
    {
        checkMember(newMember);
        if (index === 0)
        {
            pushFront(newMember);
        }
        else if (index >= _length)
        {
            pushBack(newMember);
        }
        else
        {
            var node:Node = takeNode(newMember);
            Node.insertBefore(getNodeAtIndex(index), node);
        }
    }

    public function toArray():Array
    {
        var array:Array = [ ];
