replace uint8_t and int8_t with equivalent correct datatypes as defined, remove useless check