Refactored data structure hierarchy