Delete dead (and wrong) code
Fix incorrect mix of byte count and char_t count