Externalize character creation in a subroutine