Improvements to many-to-many relations