Replaced KdNode with just a struct.