Re-implemented unique deque