Made floodfill more readable