Remove neighbors function.
Add more unit tests.