Added NBT class serialization