Split the functionality of RENDER-STRINGS

RENDER-STRINGS did too much and was a bit of a monster. I split off some
parts, making it easier to understand.