Added contourNodes vector to keep track of contour nodes.