Started adding proper logic based upon BFS.