Cleanup neighbors functions, make diagonals count