More changes and improvements to mongoose relationships