Implement a MultiEntity, i.e. a vector of entities with some additional functionality, and a LocalGeometry class to transform between entities of different level that are nested.