object tree manipulation with flat structures