Added bytearray (de)serialization, plus tests