pack: made serialization version an enum, not static const int to prevent multiple definitions
lex: added root extractor method