Move the code for accessing a character into its own function.

This will make it easier to change in the future.
Use name_only when extending a string-named character.

Fixes #408.