Replaced the Bytestream class with QDataStream