Refactory deque