Refactored deque to follow webscript.io library conventions