Algo: Gave in to temptation to reuse code.
Algo: clean up queue and stack.