Refactor common string generation stylesheets #1188