rewriting to separate concerns

the Deque bit is mostly separate from the circular list bit.