Replaced node color with visited boolean