Fixed up algorithm for Neighbors, passes tests.