clearer assert statement
remove useless "classes" deque

(now that we have topological sorting)