Optimized RAM usage by using bytes in place of uint8_t where applicable.