removal of entities in favor of orphan nodes

also removed add_flags and clear_flags