Add saving/restoring templates.
Improve docs