[Yt-dev] Hierarchy optimization