move formatting and string construction functions from generate/ to morphology/