Changed batch process doc traversal to breadth first