Added modeltree population for subentities
Some bug fixing