Better distinction between uncounted leaves and counted indices
NodeFactory classes moved to separate source file