By using a lot of CSS ninja, the script has been cut from 292 to 52 lines. The generator script has been updated to use ES6 backtick template strings.