Cleaning up neighborhood code