improved doc on templates and units