Clean up templating.