Mongo model updates

Support related entities using Mongo DB references. Added an Environment
helper class to determine the class prefixes for e.g. Model classes.