reorganized structure. separated nbt parser.