optimize NBT usage and some other oddities