Updated deque template