Backport upstream changes form diazo genereator
Add qunit test setup and refactor layout