Tidy up character handling