Improve Mongo relationship generation & querying