Inplemented ordering for DFS and BFS. Ready to comment.