Pushed entity tree relationships to end of file because we cannot add subentities before they are initialized properly