Refactor insertLetter to insertCharacter