Added neighbour detection.