Fixed neighbour stuff, also distance is correct now.