Reduced size

changed some uint16 to uint8 based on feedback from @Damme