Initialize from template