Use text/template instead of hacking together layers of decorators