Use uint8_t as the type for 'byte' rather than 'char' because bytes should be unsigned