Refactor stringification a little