clarified templating for easier link rewriting