Implemented adjacency as a many-to-many relation