Properly name hooks according to hierarchy.