Ported NodeIDAllocator from SC.
Implemented some of RootNode.