Fix and remove some unnecessary key and charcodes