Implemented basic hierarchy management logic.