Init from template