Implement bidirectional relationships

Neighbor relationships are now bidirectional. This was an error in
the previous version of the framework.