Completed new and faster deque version