Structuring activities using a template