Rework toot handling to be more independent of template changes; Move HTML templates into doc source