Cleaned up neighborhood code a bit