breadth first search (using functionnal queues), better print_order, and cosmetics