Add node states allocation and bookkeeping